[collectd] Varnish plugin

Marc Fournier marc.fournier at camptocamp.com
Fri Jun 4 16:45:36 CEST 2010


> I created a new plugin to monitor a Varnish [1] instance.
> 
> So far the plugin monitor statistics about cache (hit/misses) and
> connections but could monitor more in the future.

As a varnish user, I'm glad to know I'll be able to have collectd
make nice graphs from it soon ! Many thanks for your work so far
Jérôme, I'm really looking forward to use it ! Let me know if I can
help testing or something.

As the varnishstat engine gathers a quite large number of values
(around a hundred as of varnish 2.1), I think it would be a pity to
arbitrarily only graph half a dozen of them in collectd. Wouldn't it be
an idea to let the user choose which ones he wants to graph in
collectd.conf ? What do you think ?

> The patch is attached to this message, it has been generated against
> the master branch of my local collectd copy.

Just out of curiosity, is there any chance this plugin will build on
older collectd versions such as 4.5 ?

> Yeah I already thought about that and I was not sure what to do here.
> Even though it is in theory possible to run multiple varnishd
> instances on the same host, in practice it is quite common to have
> only one instance per host.  

AFAIK, the default varnish instance name is the host's FQDN. Maybe would
it be an idea have the instance name appear in the path where the rrd
files get saved (sort of like the cpu and disk plugins do) ? Although I
agree that in 99% of the cases people would have only one instance per
host.

# varnishstat -1 > /dev/null 
# echo $?
0
# varnishstat -1 -n foo > /dev/null 
Cannot open /var/lib/varnish/foo/_.vsl: No such file or directory
# echo $?
1
# varnishstat -1 -n $(hostname --fqdn) > /dev/null 
# echo $?
0

Cheers,
Marc



More information about the collectd mailing list