aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/plugin
diff options
context:
space:
mode:
authorPim van den Berg2011-04-18 20:09:17 +0200
committerPim van den Berg2011-04-18 20:09:17 +0200
commit268b6dbadfcc21fe0970b0e8d7e61f0c446cbf22 (patch)
treef6bce9e4783567aeccaeb7a8e7a54e62f9c05cba /plugin
parentplugin: add varnish plugin (diff)
downloadapt-panopticon_cgp-268b6dbadfcc21fe0970b0e8d7e61f0c446cbf22.zip
apt-panopticon_cgp-268b6dbadfcc21fe0970b0e8d7e61f0c446cbf22.tar.gz
apt-panopticon_cgp-268b6dbadfcc21fe0970b0e8d7e61f0c446cbf22.tar.bz2
apt-panopticon_cgp-268b6dbadfcc21fe0970b0e8d7e61f0c446cbf22.tar.xz
plugin/varnish: deduplicate rrd_format values
Diffstat (limited to 'plugin')
-rw-r--r--plugin/varnish.php4
1 files changed, 1 insertions, 3 deletions
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';
25$obj = new Type_Default($CONFIG); 25$obj = new Type_Default($CONFIG);
26$obj->width = $width; 26$obj->width = $width;
27$obj->heigth = $heigth; 27$obj->heigth = $heigth;
28$obj->rrd_format = '%5.1lf%s';
28switch($obj->args['pinstance']) { 29switch($obj->args['pinstance']) {
29 case 'default-backend': 30 case 'default-backend':
30 $obj->rrd_title = 'backend'; 31 $obj->rrd_title = 'backend';
31 $obj->rrd_vertical = 'hits'; 32 $obj->rrd_vertical = 'hits';
32 $obj->rrd_format = '%5.1lf%s';
33 break; 33 break;
34 case 'default-cache': 34 case 'default-cache':
35 $obj->rrd_title = 'cache'; 35 $obj->rrd_title = 'cache';
36 $obj->rrd_vertical = 'hits'; 36 $obj->rrd_vertical = 'hits';
37 $obj->rrd_format = '%5.1lf%s';
38 break; 37 break;
39 case 'default-connections': 38 case 'default-connections':
40 $obj->rrd_title = 'connections'; 39 $obj->rrd_title = 'connections';
41 $obj->rrd_vertical = 'hits'; 40 $obj->rrd_vertical = 'hits';
42 $obj->rrd_format = '%5.1lf%s';
43 break; 41 break;
44} 42}
45collectd_flush($obj->identifiers); 43collectd_flush($obj->identifiers);