From 268b6dbadfcc21fe0970b0e8d7e61f0c446cbf22 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Mon, 18 Apr 2011 20:09:17 +0200 Subject: plugin/varnish: deduplicate rrd_format values --- plugin/varnish.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'plugin') diff --git a/plugin/varnish.php b/plugin/varnish.php index 703a49f..4de4463 100644 --- a/plugin/varnish.php +++ b/plugin/varnish.php @@ -25,21 +25,19 @@ require_once 'inc/collectd.inc.php'; $obj = new Type_Default($CONFIG); $obj->width = $width; $obj->heigth = $heigth; +$obj->rrd_format = '%5.1lf%s'; 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); -- cgit v1.1