From 36140cf61a3b19c008aec9d19bbe39fbe4e19df9 Mon Sep 17 00:00:00 2001 From: Aurélien ROUGEMONT Date: Mon, 18 Apr 2011 20:08:37 +0200 Subject: plugin: add varnish plugin --- plugin/varnish.php | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 plugin/varnish.php (limited to 'plugin') diff --git a/plugin/varnish.php b/plugin/varnish.php new file mode 100644 index 0000000..703a49f --- /dev/null +++ b/plugin/varnish.php @@ -0,0 +1,46 @@ +width = $width; +$obj->heigth = $heigth; +switch($obj->args['pinstance']) { + case 'default-backend': + $obj->rrd_title = 'backend'; + $obj->rrd_vertical = 'hits'; + $obj->rrd_format = '%5.1lf%s'; + break; + case 'default-cache': + $obj->rrd_title = 'cache'; + $obj->rrd_vertical = 'hits'; + $obj->rrd_format = '%5.1lf%s'; + break; + case 'default-connections': + $obj->rrd_title = 'connections'; + $obj->rrd_vertical = 'hits'; + $obj->rrd_format = '%5.1lf%s'; + break; +} +collectd_flush($obj->identifiers); +$obj->rrd_graph(); -- cgit v1.1