Docs » Integrations Guide » Integrations Reference » Memcached

image0 Memcached

Metadata associated with the Memcached plugin for collectd can be found here. The relevant code for the plugin can be found here.

DESCRIPTION

Use the Memcached plugin for collectd to monitor the following types of information from a Memcached node:

  • request information (including hits, misses & evictions)
  • current connections
  • net input/output bytes
  • number of items cached

Documentation for Memcached can be found here: https://github.com/memcached/memcached/wiki

FEATURES

Built-in dashboards

  • Memcached (a): Overview of data from all Memcached hosts.

image1

  • Memcached: Focus on a single Memcached host.

image2

REQUIREMENTS AND DEPENDENCIES

Version information

Software Version
collectd 4.2 or later
memcached 1.1 or later

INSTALLATION

If you are using the new Smart Agent, see the docs for thecollectd/memcachedmonitor for more information. The configuration documentation below may be helpful as well, but consult the Smart Agent repo’s docs for the exact schema.

  1. Download SignalFx’s sample memcached configuration file to /etc/collectd/managed_config.
  2. Modify the sample configuration file to provide values that make sense for your environment, as described in Configuration, below.
  3. Restart collectd.

CONFIGURATION

Using the example configuration file 10-memcached.conf as a guide, provide values for the configuration options listed below that make sense for your environment and allow you to connect to the Memcached instance to be monitored.

configuration option definition example value
Host Hostname at which collectd can connect to Memcached. 127.0.0.1
Port Port at which collectd can connect to Memcached. 11211

USAGE

Sample of built-in dashboard in SignalFx:

image3

METRICS

Below is a list of all metrics.

Metric Name Brief Type
df.cache.free Unused storage bytes gauge
df.cache.used Current number of bytes used to store items gauge
memcached_command.flush Number of flush requests cumulative counter
memcached_command.get Number of retrieval requests cumulative counter
memcached_command.set Number of storage requests cumulative counter
memcached_command.touch Number of touch requests cumulative counter
memcached_connections.current Current number of open connections gauge
memcached_connections.listen_disabled Number of times connection limit has been exceeded gauge
memcached_items.current Current number of items stored by this instance gauge
memcached_octets.rx Total network bytes read by this server cumulative counter
memcached_octets.tx Total network bytes written by this server cumulative counter
memcached_ops.decr_hits Number of successful Decr requests cumulative counter
memcached_ops.decr_misses Number of decr requests against missing keys cumulative counter
memcached_ops.evictions Number of valid items removed from cache cumulative counter
memcached_ops.hits Number of keys that have been requested and found present cumulative counter
memcached_ops.incr_hits Number of successful incr requests cumulative counter
memcached_ops.incr_misses Number of incr requests against missing keys cumulative counter
memcached_ops.misses Number of items that have been requested and not found cumulative counter
ps_count.threads Number of worker threads requested gauge
ps_cputime.syst Total system time for this instance cumulative counter
ps_cputime.user Total user time for this instance cumulative counter

df.cache.free

gauge

Number of allocated but unused storage bytes.

Result of subtracting the memcached stats command’s ‘bytes’ value from its ‘limit_maxbytes’ value.

df.cache.used

gauge

Current number of bytes used to store items.

From memcached stats command’s ‘bytes’ value.

memcached_command.flush

cumulative counter

Number of flush requests processed by an instance.

memcached_command.get

cumulative counter

Number of retrieval requests processed by an instance.

memcached_command.set

cumulative counter

Number of storage requests processed by an instance.

memcached_command.touch

cumulative counter

Number of touch requests processed by an instance.

memcached_connections.current

gauge

Current number of open connections.

memcached_connections.listen_disabled

gauge

Number of times connection limit has been exceeded.

Current version of collectd plugin reports this as a gauge when it should be a cumulative counter. See explanation of this metric here: https://code.google.com/p/memcached/wiki/NewServerMaint#listen_disabled_num

memcached_items.current

gauge

Current number of items stored by this instance.

memcached_octets.rx

cumulative counter

Total network bytes read by this server.

From memcached stats command’s ‘bytes_read’.

memcached_octets.tx

cumulative counter

Total network bytes written by this server.

From memcached stats command’s ‘bytes_written’.

memcached_ops.decr_hits

cumulative counter

Number of keys that have been found and decremented.

memcached_ops.decr_misses

cumulative counter

Number of decr requests against missing keys.

memcached_ops.evictions

cumulative counter

Number of valid items removed from the cache to free memory for new items.

memcached_ops.hits

cumulative counter

Number of keys that have been requested and found present.

memcached_ops.incr_hits

cumulative counter

Number of keys that have been found and incremented.

memcached_ops.incr_misses

cumulative counter

Number of incr requests against missing keys.

memcached_ops.misses

cumulative counter

Number of items that have been requested and not found.

ps_count.threads

gauge

Number of worker threads requested.

ps_cputime.syst

cumulative counter

Total system time for this instance (seconds:microseconds).

From memcached stats command’s ‘rusage_system’.

ps_cputime.user

cumulative counter

Total user time for this instance (seconds:microseconds).

From memcached stats command’s ‘rusage_user’.