#!/bin/bash

/usr/local/bin/varnishstat -1 > /tmp/varnish.$$

awk '{
        printf ("%s:%s ",$1,$2)
}' /tmp/varnish.$$

rm -rf /tmp/varnish.$$

Usage:


As root setup a cronjob:

* * * * * /usr/local/varnish/bin/varnishstat  -1 > /tmp/varnishstat


Add an user parameter to zabbix:

UserParameter=varnish.stat[*],cat /tmp/varnishstat | grep "$1 " | awk '{print $$2}'