[collectd] Varnish plugin

Florian Forster octo at verplant.org
Tue Jun 8 12:31:06 CEST 2010

Hi Marc,

On Tue, Jun 08, 2010 at 10:45:51AM +0200, Marc Fournier wrote:
> A few relevant pieces below:

could you look for relevant information in "config.log", the file
created by the configure script? Something like

  grep -C 10 varnish config.log

should do the trick I hope.

> /usr/lib64/libvarnish.so
> /usr/lib64/libvarnishapi.so
> /usr/lib64/libvarnishcompat.so

Also, an "ldd" of each of those files would be interesting for the RHEL
box. On Debian Squeeze I know it's broken :/

> Can you elaborate on the "hands-on fixing" you mentioned ?

Sure. Under Debian, the libvarnish-dev package has at least three bugs:

  - "libvarnishapi" uses symbols from "libvarnish" but doesn't link
    against it. This means that you can't simply use "-lvarnishapi" –
    you need to specify "-lvarnish", too.

  - The pkg-config file doesn't account for this, i.e. the following
    output isn't enough.

> $ pkg-config --libs varnishapi
> -lvarnishapi

  - The package is missing the "libvarnishapi.so" symlink, so the linker
    only finds the static libraries.

To work around these problems, do the following:

  - Create the required symlinks by hand:
    /usr/lib # ln -s libvarnish.so.1 libvarnish.so
    /usr/lib # ln -s libvarnishapi.so.1 libvarnish.so

  - Add the .pc file to include the required libraries. Under Debian,
    edit /usr/lib/pkgconfig/varnishapi.pc so that the "Libs:" line

    Libs: -L${libdir} -lvarnishapi -lvarnish -lpcre

Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
-------------- 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/20100608/1330e905/attachment.pgp 

More information about the collectd mailing list