Telegraf: Varnish 3 support for varnish input plugin

Created on 17 Jun 2016  路  3Comments  路  Source: influxdata/telegraf

Hi,
It seems the current varnish plugin doesn't support varnish 3 .
The output is slightly different for main stats as they don't have a MAIN prefix

This is an output of /usr/bin/varnishstat -j : http://pastebin.com/s2rGTRMj

One solution would be to add a parameter to specify the varnishstat version and process data accordingly.
For version 3 it would be to add a MAIN prefix to fields that doesn't already have one. (Currently those fields aren't saved at all because of that)

Would it be an acceptable change to the plugin ?

Most helpful comment

Hi,
My temporary workaround was a simple bash script:

#!/bin/bash
/usr/bin/varnishstat -1 | sed -e '/^[A-Z]/! s/^/MAIN./'

Place it somewhere on disk with execute permissions and then point its path in varnish input plugin section of telegraf.conf

All 3 comments

I've got the same issue

Hi,
My temporary workaround was a simple bash script:

#!/bin/bash
/usr/bin/varnishstat -1 | sed -e '/^[A-Z]/! s/^/MAIN./'

Place it somewhere on disk with execute permissions and then point its path in varnish input plugin section of telegraf.conf

This can close because Varnish 3 is not supported. https://varnish-cache.org/releases/

Was this page helpful?
0 / 5 - 0 ratings