#!/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}‘
本文出自 “muzinan的技术博客” 博客,谢绝转载!
原文地址:http://muzinan110.blog.51cto.com/684213/1559791