Closed viable-hartman closed 5 years ago
Just a follow up strings on the Varnish 5.2.1 api lib shows:
strings /lib64/libvarnishapi.so.1.0.6 | grep LIBVARNISHAPI LIBVARNISHAPI_2.0 LIBVARNISHAPI_2.0
...so /lib64/libvarnishapi.so.1: version `LIBVARNISHAPI_1.0' will of course fail, but the merged pull request here: https://github.com/Stackdriver/collectd/pull/134 seems to indicate this should work for 5.2, but I'm not sure how that's possible when 5.2 uses LIBVARNISHAPI_2.0 and the stackdriver agent is still looking for LIBVARNISHAPI_1.0
Just another follow up, I think the issue is that your version of the stackdriver varnish.so plugin is compiled against the wrong varnish libs. I extracted the varnish.so lib from this Fedora RPM, http://download-ib01.fedoraproject.org/pub/fedora/linux/updates/29/Everything/x86_64/Packages/c/collectd-varnish-5.8.1-1.fc29.x86_64.rpm,
and it works just fine with my Varnish 5.2.1 and appears to reference the correct lib LIBVARNISHAPI_2.0
I just confirmed. It looks like the varnish.so library deployed with stackdriver collectd is compiled against Varnish 3 or 4. I compiled it against Varnish 5 loaded as follows:
curl -s https://packagecloud.io/install/repositories/varnishcache/varnish5/script.rpm.sh | bash
yum -y update \ && yum -y install varnish varnish-devel varnish-libs varnish-libs-devel varnish-modules
cd /tmp \ && git clone https://github.com/stackdriver/collectd.git \ && cd collectd/ \ && ./build.sh \ && ./configure --prefix=/opt/stackdriver/collectd --enable-varnish \ && make \ && make install \ && rm -rf /tmp/collectd \ && mv /opt/stackdriver/collectd/lib/collectd/varnish.so /root/build/varnish.so
and varnish.so is just fine. So its definitely the version of Varnish libs compiled against.
I'm glad you were able to solve the issue. Support for Varnish in our agent has been deprecated, so we won't be updating the plugin for Varnish 5. For more details, see https://cloud.google.com/monitoring/agent/plugins/varnish
Expected behavior
I expect the plugin configured as indicated here Google Raw StackDriver Varnish Config to actually load.
Actual behavior
However libvarnishapi.so.1 is there as a sym link to the actual library, but the compiled varnish.so library from stackdriver does not believe it's the correct version.
Steps to reproduce