From 074589c36937a468587abe37bc4ce0fbddf80b20 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Wed, 5 Sep 2012 16:07:44 +0200 Subject: apply datasize (bytes/bits) only to network related data As discussed in https://github.com/pommi/CGP/pull/1. --- plugin/vserver.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'plugin/vserver.php') diff --git a/plugin/vserver.php b/plugin/vserver.php index 204134e..c727ad9 100644 --- a/plugin/vserver.php +++ b/plugin/vserver.php @@ -51,8 +51,7 @@ switch($obj->args['type']) { $obj->heigth = $heigth; $obj->rrd_title = sprintf('Memory utilization on Vserver %s', $obj->args['pinstance']); - $obj->rrd_vertical = ucfirst($CONFIG['datasize']); - $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1; + $obj->rrd_vertical = 'Bytes'; $obj->rrd_format = '%5.1lf%s'; collectd_flush($obj->identifiers); @@ -105,8 +104,8 @@ switch($obj->args['type']) { 'unspec-tx' => '000080', ); $obj->rrd_title = sprintf('Traffic on Vserver %s', $obj->args['pinstance']); - $obj->rrd_vertical = sprintf('%s per second', ucfirst($CONFIG['datasize'])); - $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1; + $obj->rrd_vertical = sprintf('%s per second', ucfirst($CONFIG['network_datasize'])); + $obj->scale = $CONFIG['network_datasize'] == 'bits' ? 8 : 1; $obj->width = $width; $obj->heigth = $heigth; $obj->rrd_format = '%5.1lf%s'; -- cgit v1.1