Monitoring Memcached

Configure the Server Density agent to monitor your Memcached instance to:

• Collect important metrics, such as hits. usage & item sizes
• Identify overall server slowdowns caused by the instance

Monitored metrics

  • Total Items
  • Uptime
  • Connection Structures
  • Current Connections
  • Threads
  • Limit Maxbytes
  • Current Items
  • Pointer Size
  • Fill Percent
  • Check And Set Miss Rate
  • Check And Set Hit Rate
  • Delete Miss Rate
  • Delete Hit Rate
  • User Seconds for Process Rate
  • System Seconds for Process Rate
  • Bytes Read Rate
  • Check And Set Bad Value Rate
  • Total Connections Rate
  • Get Hits Rate
  • Get Misses Rate
  • Command Set Rate
  • Bytes Written Rate
  • Bytes
  • Command Flush Rate
  • Evictions Rate

Installing the Memcached plugin package

Install the Memcached plugin on Debian/Ubuntu:

sudo apt-get install sd-agent-memcache

Install the Memcached plugin on RHEL/CentOS:

sudo yum install sd-agent-memcache

Read more about agent plugins.

Configuring the agent to monitor Memcached

1. Configure /etc/sd-agent/conf.d/mcache.yaml


- url: localhost # url to connect to the memcached instance
  • If memcached runs on a port other than 11211, specify the port in the config file as necessary 

2. Restart the agent

sudo /etc/init.d/sd-agent restart

Verifying the configuration
Execute info to verify the configuration with the following:

sudo /etc/init.d/sd-agent info 

If the agent has been configured correctly you’ll see an output such as:

  - instance #0 [OK]
  - Collected 4 metrics & 0 events

You can also view the metrics returned with the following command:

sudo -u sd-agent /usr/share/python/sd-agent/ check mcache

Configuring graphs

Click the name of your server from the Devices list in your Server Density account then go to the Metrics tab. Click the + Graph button on the right then choose the Memcached metrics to display the graphs. The metrics will also be available to select when building dashboard graphs.

Further reading

We have a detailed blog post about how to monitor memcahced.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


  • Avatar
    Kees Fransen


    The command to install on Debian/Ubuntu should be:

    apt-get install sd-agent-memcache 

    as per shown when performing

    apt-cache search sd-agent


    Edited by Kees Fransen
  • Avatar
    Harry Perks
    Thanks! We've updated the article.

Monday  —  Friday.

10am  —  6pm UK.

Dedicated Support.