Varnish plugin for collectd won't build against Varnish 3.x. Varnish 3 renamed and removed several of the status fields as well as changing the way the API opens and closes the SHM and gets access to the status structure. Reproducible: Always Steps to Reproduce: 1.Install Varnish 3+ 2.Alter "make.conf" to include the varnish plugin 3.Attempt to emerge app-admin/collectd. Actual Results: The gist of the resulting error was that there was a version mismatch. Expected Results: A collectd which will gather Varnish 3 statistics. I am attaching a patch for collectd that will adapt it to be able to work with Varnish 3. I'm not a varnish or collectd expert but its working for me. I don't work with the autoconf tools so there is some fixing to be done. I patched configure.in to check for the new calls in Varnish and allow the building. I also patched the varnish plugin to be able to work with Varnish 2 or 3 based on a define. I set the define at the top of "varnish.c". Dropping this patch file in /etc/portage/patches/... allowed me to build for use with Varnish 3.
Created attachment 289725 [details, diff] Patches to build with Varnish 3.
Thanks a lot for the patch. Will have a look later tonight. Also notifying upstream!
Patch added in 5.0.1, thanks!
(In reply to comment #3) > Patch added in 5.0.1, thanks! You're welcome! So I'm curious what mechanism was added to the patch to support building for either Varnish 2 or 3? I will probably need to be prepared for that with the next update cycle. THX!