[collectd] Varnish plugin

Florian Forster octo at verplant.org
Mon Jun 7 18:30:12 CEST 2010


Hi Jérôme,

On Fri, Jun 04, 2010 at 05:42:10PM +0200, Jerome Renard wrote:
> 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

I've changes some things in the Varnish plugins based on your current
master branch. The changes are available on Github from the jr/varnish
branch [0].

Sorry that I didn't just merge your branch: I changed the author name to
your full name. While I was at it I added a "Varnish plugin: " prefix to
the commit messages because that makes writing the ChangeLog entry
easier.

Other than that, there are two new "features": The configure script now
uses pkg-config to determine the correct C- and LD-flags. Unfortunately,
the Debian package is broken in this respect so that building under
Debian currently needs some hands-on hacking fixing. I opened bug
reports but I doubt this will be fixed soon – a similar bug report has
been open since November 2009 :(

I also implemented configuration for multiple instances. You can now
configure multiple instances using a configuration like:

  <Plugin varnish>
    <Instance "foo">
      MonitorCache true
      MonitorConnections true
    </Instance>
    <Instance "bar">
      MonitorCache true
      MonitorConnections true
      MonitorBackend true
    </Instance>
  </Plugin>

To only select the default instance, you can omit the instance name:

  <Plugin varnish>
    <Instance>
      MonitorCache true
      MonitorConnections true
    </Instance>
  </Plugin>

If no configuration is specified, a set of default metrics is collected
from the default instance. Currently that's "MonitorCache" and
"MonitorConnections" but you're the expert, so it'd be great if you
could come up with a "sane" set of defaults.

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

I'm using the "plugin instance" to store the instance name. If the
instance name is the default instance, then the plugin instance is left
empty. So in the default case, there is no clutter. I hope that's
reasonable…?

Unfortunately I'm flying blind because I don't have a Varnish instance
running anywhere. It'd be awesome if you could test the changes for me.

Regards,
—octo

[0] <http://github.com/octo/collectd/tree/jr/varnish>
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20100607/947bc4bd/attachment.pgp 


More information about the collectd mailing list