[collectd] Varnish plugin

Jerome Renard jerome.renard at gmail.com
Fri Jun 4 17:42:10 CEST 2010

Hi Marc,

On Fri, Jun 4, 2010 at 4:45 PM, Marc Fournier
<marc.fournier at camptocamp.com> wrote:
>> 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.

I think you should be happy to see that Florian integrated the Varnish plugin
into the master branch a earlier today :
- http://github.com/octo/collectd/commit/e9a9482ab6d6ce752fff934625be962d0f88251b

You can indeed help if you want to, I work on a fork of Florian's
master branch, you can
get it from my github account :
- http://github.com/jeromer/collectd

What would be cool is that you test the plugin as it is now and if it
works fine for you.

> 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 ?

I totally agree, this is why I started to implement configuration variables
in collectd.conf so you can decide exactly what you want to monitor:
- http://github.com/jeromer/collectd/blob/master/src/collectd.conf.in#L846

The work is still in progress but I think that adding new monitors
should not be a problem :)

>> 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.

If I understood correctly what you mean, this is already the case, for example
the machine I use to develop the plugin is called "debian-collectd" and the path
used to store rrd files is, for example :
- debian-collectd/varnish/varnish_cache_ratio-cache_hit

Does that answer your question ?

Have a nice day :)


More information about the collectd mailing list