Percona Memcached Monitoring Template for Cacti

These templates use ss_get_by_ssh.php to connect to a server via SSH and extract statistics from the memcached server running there, by executing the nc (netcat) program with the command “STAT”. This means you don’t need any memcached APIs installed. Standard Unix command-line tools are all you need.

Installation

Once the SSH connection is working, you need to test the memcached function. You may need to change some of the example values below, such as the cacti username and the hostname you’re connecting to:

sudo -u cacti php /usr/share/cacti/scripts/ss_get_by_ssh.php --type memcached --host 127.0.0.1 --items ij,ik

You need nc on the server. Some versions of nc accept different command-line options. You can change the options used by configuring the PHP script. If you don’t want to do this for some reason, then you can install a version of nc that conforms to the expectations coded in the script’s default configuration instead.

On Debian/Ubuntu, netcat-openbsd does not work, so you need the netcat-traditional package, and you need to switch to /bin/nc.traditional with the following command:

update-alternatives --config nc

Also for Debian re-define PHP variable in ss_get_by_ssh.php.cnf this way:

<?php
$nc_cmd = 'nc -q1';

Sample Graphs

The following sample graphs demonstrate how the data is presented.

../_images/memcached_additions_and_evictions.png

Shows how many items were added and evicted.

../_images/memcached_connections.png

Shows how many connections have been made.

../_images/memcached_current_items.png

Shows how many items are stored in the server.

../_images/memcached_memory.png

Shows how much memory the server is using.

../_images/memcached_requests.png

Shows how many gets and sets have happened, as well as how many of the gets were misses (there was no item in the cache).

../_images/memcached_rusage.png

Shows the resource usage statistics reported by memcached, in system and user CPU time.

../_images/memcached_traffic.png

Shows the network traffic in and out of the memcached server.

Percona Monitoring Plugins
Call Us
+1-888-316-9775 (USA - Sales)
+1-208-473-2904 (USA - Sales)
+44-208-133-0309 (UK - Sales)
0-800-051-8984 (UK - Sales)
0-800-181-0665 (GER - Sales)
+1-877-862-4316 (Emergency)
+1-855-55TRAIN (Training)
+1-925-271-5054 (Training)

Table Of Contents

Previous topic

Percona Linux Monitoring Template for Cacti

Next topic

Percona MongoDB Monitoring Template for Cacti



© Copyright 2012, Percona Inc.
Except where otherwise noted, this documentation is licensed under the following license:
CC Attribution-ShareAlike 2.0 Generic
This documentation is developed in Launchpad as part of the Percona Monitoring Plugins source code.
If you spotted innacuracies, errors, don't understood it or you think something is missing or should be improved, please file a bug.
]]>