We’ve been using Varnish cache for some time, and I’ve been massively impressed by both its performance and flexibility. As part of a solution to help scale websites it’s unbeatable, especially with its support for ESI.
Anyway, we wanted to integrate monitoring of Varnish into the existing Cacti setup we have, and so I wrote a little plugin to do this. It’s loosely based on the code posted here but it’s more ‘inspired by’ rather than based upon.

It produces just one graph (above), which shows the number of requests/second, hits/second and misses/second.
Installation is pretty straightforward:
- Make the Varnish management daemon available to your Cacti machine (Make sure you lock down appropriately with iptables or similar, because there is no authentication for this interface)
- Copy get_varnish_stats.py to your cacti scripts directory (/usr/share/cacti/site/scripts in Debian/Ubuntu)
- Import the XML template via the Cacti interface
You can download the plugin here.
2 Comments for Varnish Cache Statistics via Cacti
Ernesto Gámez | February 21, 2012 at 10:40 am
Ernesto Gámez | February 21, 2012 at 1:02 pm
I’m Ernesto again,
I found the problem, but i do not know how to solve it. It seems that the script catch data doing a telnet and executing “stats” but in version 3 of varnish, this functions has been removed.
You know how to solve that in your plugin???
Thanks



Hi,
I use your plugin for monitorice varnish throug cacti, and works fine with varnish 2 version. I recently updated varnish version to 3 and the plugins stops working.
You know how i can solve that??
Thanks