Monitoring and collecting data from Memcached

Memcached is a free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load. Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.

More information on: https://memcached.org/

How it works

The Memcached plugin gathers statistics such as the number of connections, the number of gets, etc. using the Memcached interface.

These statistics are gathered in Memcached by default and no additional configuration is required. Just provide the connection details for the Memcached server and the plugin is ready to go.

The minimal supported version of Memcached is 1.4.

Installation

The plugin needs to be installed together with a CoScale agent, instructions on how to install the CoScale agent can be found here. If you want to monitor Memcached inside Docker containers using CoScale, check out the instructions here.

Configuration

Connection details

The CoScale plugin requires the host and port to the local Memcached service. It is possible to supply multiple hosts and ports if you are running multiple Memcached instances on the same machine.

Active checks

This plugin can be configured to perform a command on your Memcached. This active monitoring allows us to calculate the uptime of the service and the response time of the command.

A valid Memcached command (eg. get my-test-key) should be provided.

Metrics

Memcached

Name Unit Dimensions
Memcached active check latency s Memcached port
Memcached active check uptime % Memcached port

Memcached / Cache

Name Unit Dimensions
Memcached bytes in cache b Memcached port
Memcached evictions #/s Memcached port
Memcached hash table size b Memcached port
Memcached items in cache items Memcached port
Memcached max size cache b Memcached port
Memcached reclaimed #/s Memcached port
Memcached unfetched evicted #/s Memcached port
Memcached unfetched expired #/s Memcached port
Total Memcached items items Memcached port

Memcached / Commands

Name Unit Dimensions
Memcached auth commands #/s Memcached port
Memcached auth errors #/s Memcached port
Memcached flush commands #/s Memcached port
Memcached get commands #/s Memcached port
Memcached set commands #/s Memcached port
Memcached touch commands #/s Memcached port

Memcached / Connections

Name Unit Dimensions
Accepting connections by Memcached conn Memcached port
Current connections to Memcached conn Memcached port
Max connections reached to Memcached conn Memcached port
Memcached connection structures # Memcached port
Memcached reversed file descriptors # Memcached port
Total connections to Memcached conn Memcached port
Yielded connections to Memcached conn Memcached port

Memcached / Hits and Misses

Name Unit Dimensions
Memcached check and set bad value #/s Memcached port
Memcached check and set hits #/s Memcached port
Memcached check and set misses #/s Memcached port
Memcached decrement hits #/s Memcached port
Memcached decrement misses #/s Memcached port
Memcached delete hits #/s Memcached port
Memcached delete misses #/s Memcached port
Memcached get hits #/s Memcached port
Memcached get misses #/s Memcached port
Memcached increment hits #/s Memcached port
Memcached increment misses #/s Memcached port
Memcached touch hits #/s Memcached port
Memcached touch misses #/s Memcached port

Memcached / Resources

Name Unit Dimensions
Memcached bytes read b Memcached port
Memcached bytes written b Memcached port
Memcached process id   Memcached port
Memcached system time % Memcached port
Memcached threads threads Memcached port
Memcached uptime s Memcached port
Memcached user time % Memcached port

Events

Name Description Attributes
MEMCACHED service state watcher State watcher status