Bashton Blog

Oct/09

23

Varnish Cache Statistics via Cacti

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.

Example cacti-varnish graph

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.

RSS Feed

No comments yet.

Leave a comment!

<<

>>

Find it!

Theme Design by devolux.nh2.me