Skip navigation
Currently Being Moderated

Memcached Data Source

VERSION 5  Click to view document history
Created on: May 24, 2010 1:10 PM by Matt Ray - Last Modified:  Sep 1, 2011 2:59 PM by B Maqueira

Submitted by: B Maqueira


Description:

This ZenPack provides a custom MemcachedStats Data Source which automatically brings over the stats for monitoring Memcached. The author has an excellent write-up on his blog: Monitoring memcached with a Zenoss Zenpack. The following instructions have been copied over.


Monitoring memcached
  1. Create a template to hold the datasources & graph definitions at Device level:

    Click on Devices under Classes on the left menu, followed by Templates tab, then on the drop down arrow to expand the menu and select Add Template

    1add-template.gif

  2. Type the template name MemcachedStats in the popup div and click OK2add-template-MS.gif:

     

  3. Add a MemcachedStats datasource

    In the template page displayed, set the description of the template. Then click the drop-down arrow to add a datasource:

    3add-datasource.gif

  4. Then type in a name for the datasource: MemcachedStats and select MemcachedStats as the datasource type:4add-datasource-MS.gif

     

  5. On the next page you can change the settings to match your memcached connection settings, typically you may need to change the port to connect to the appropiate instance. Here you will also see a list of all the datapoints provided by the MemcachedStats datasource:

    5ms-ds.gif

  6. Define Graphs to visualize memcached's performance

    To finish the template, add graphs definitions using the datapoints provided by the above datasource. To do this, go back to /Devices/Templates/MemcachedStats and click on the drop-down arrow in the Graphs section, select Add Graph, give it a name and click OK

    6add-graph.gif

     

  7. On the resulting Graph settings page, click the drop-down arrow next to Graph points, and click on Add Datapoint, select the points that you would like to appear in the current Graph and click OK:

    7add-graph-datapoint.gif

    8select-graph-points.gif

  8. Bind the created template to the device where your memcached instance is running

    Once the performance template has been completed, the final step is to bind the template to the devices were the memcached instances are running to start collecting data. In my example memcached is running on localhost, default port 11211. So, let's go to /Devices/localhost, click the drop-down arrow next to Status and select More and Templates:

    9edit-templates.gif

  9. Select the drop-down arrow next to Performance Templates for localhost and click on Bind Templates option. Then make sure the MemcachedStats template is selected (Use Ctrl+click to select multiple templates):

    10bind-templates.gif

    11select-templates.gif

  10. View your performance data

    Now your setup is complete and Zenoss will start monitoring your memcached instance. Wait some time to allow the collector to fetch data several times and then go to the perf tab of the localhost device:

    12perf.gif

 

3.0 Appearance:

memcache30.png

 

Hints & Tips
  • If you have more than one memcached runing in the same server you can add further datasources to the template (1 datasource = 1 memcached instance / port).
  • Keep the timeout in the datasource config low to avoid the overall running of the zencommand timing out.
  • Group your datapoints by info type so your graphs are easier to read, or even better, create multigraph reports!

REQUIREMENTS:

  • Zenoss Version: 2.5 for file ending in "py-2.4.egg" and 3.0 for file ending in  "py-2.6.egg"
  • ZenPack Dependencies: none
  • External Dependencies: none
  • Installation: zopectl restart after installation

Source: http://zenpacks.zenoss.org/trac-zenpacks/browser/zenpacks/ZenPacks.community.Memcached

Tagged Releases:

Change History:

  • 1.0 initial release
  • 1.1 implements a small change in code that makes it compatible to monitor the modified version of memcached known as repcached. Due to memcached's nature and its typical usage I still do not see the point in providing a default template since it is very likely that setups will vary a lot from one user to another.  1.1 also had basic testing with Zenoss 3.0.
  • 1.2 :
    • zenoss 3.1.0 compatible

    • zencommand is twisted-based rather than telnetlib-based (better performance)

    • default memcached monitoring template is included (based on Luther & Dpetzel suggestions)

    • datasource provides more datapoints (as per memcached 1.4.2 stats)

 


Trac tickets: http://zenpacks.zenoss.org/trac-zenpacks/report/1

Known issues:

Attachments:
Note: binary attachments ending in .zip will need to be unzipped before use.
Comments (24)