Skip to content

Latest commit

 

History

History

mcache

Memcache Check

Overview

The Agent's Memcache check lets you track Memcache's memory use, hits, misses, evictions, fill percent, and much more.

Setup

Installation

The Memcache check is included in the Datadog Agent package, so you don't need to install anything else on your Memcache servers.

Configuration

Follow the instructions below to configure this check for an Agent running on a host. For containerized environments, see the Containerized section

Metric Collection

Host
  1. Edit the mcache.d/conf.yaml file, in the conf.d/ folder at the root of your Agent's configuration directory. See the sample mcache.d/conf.yaml for all available configuration options:

    init_config:
    
    instances:
      ## @param url - string - required
      ## url used to connect to the Memcached instance.
      #
      - url: localhost
  2. Restart the Agent to begin sending Memcache metrics to Datadog.

Containerized

For containerized environments, see the Autodiscovery Integration Templates for guidance on applying the parameters below.

Parameter Value
<INTEGRATION_NAME> mcache
<INIT_CONFIG> blank or {}
<INSTANCE_CONFIG> {"url": "%%host%%","port": "11211"}

Log Collection

Available for Agent versions >6.0

  1. Add this configuration block to your mcache.d/conf.yaml file to start collecting your Memcached Logs:

    logs:
      - type: file
        path: /var/log/memcached.log
        source: memcached
        service: mcache

    Change the path and service parameter values and configure them for your environment.

  2. Restart the Agent to validate these changes.

Validation

Run the Agent's status subcommand and look for mcache under the Checks section.

Data Collected

Metrics

See metadata.csv for a list of metrics provided by this check.

The check only collects memcache.slabs.* metrics if you set options.slabs: true in mcache.d/conf.yaml. Likewise, it only collects memcache.items.* metrics if you set options.items: true.

Events

The Mcache check does not include any events.

Service Checks

memcache.can_connect:

Returns CRITICAL if the Agent cannot connect to memcache to collect metrics, otherwise OK.

Troubleshooting

Need help? Contact Datadog support.

Further Reading