Submitted by: B Maqueira
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.
- 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
- 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:
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:
- 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
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:
- 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:
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):
- 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:
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!
- 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
- 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