diff options
author | Pim van den Berg | 2012-09-05 16:07:44 +0200 |
---|---|---|
committer | Pim van den Berg | 2012-09-05 16:10:39 +0200 |
commit | 074589c36937a468587abe37bc4ce0fbddf80b20 (patch) | |
tree | 921ffd1e49dde8bd21f625409f12d70251f3204b /plugin/vserver.php | |
parent | plugin: add snmp plugin (diff) | |
download | apt-panopticon_cgp-074589c36937a468587abe37bc4ce0fbddf80b20.zip apt-panopticon_cgp-074589c36937a468587abe37bc4ce0fbddf80b20.tar.gz apt-panopticon_cgp-074589c36937a468587abe37bc4ce0fbddf80b20.tar.bz2 apt-panopticon_cgp-074589c36937a468587abe37bc4ce0fbddf80b20.tar.xz |
apply datasize (bytes/bits) only to network related data
As discussed in https://github.com/pommi/CGP/pull/1.
Diffstat (limited to 'plugin/vserver.php')
-rw-r--r-- | plugin/vserver.php | 7 |
1 files changed, 3 insertions, 4 deletions
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']) { | |||
51 | $obj->heigth = $heigth; | 51 | $obj->heigth = $heigth; |
52 | 52 | ||
53 | $obj->rrd_title = sprintf('Memory utilization on Vserver %s', $obj->args['pinstance']); | 53 | $obj->rrd_title = sprintf('Memory utilization on Vserver %s', $obj->args['pinstance']); |
54 | $obj->rrd_vertical = ucfirst($CONFIG['datasize']); | 54 | $obj->rrd_vertical = 'Bytes'; |
55 | $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1; | ||
56 | $obj->rrd_format = '%5.1lf%s'; | 55 | $obj->rrd_format = '%5.1lf%s'; |
57 | 56 | ||
58 | collectd_flush($obj->identifiers); | 57 | collectd_flush($obj->identifiers); |
@@ -105,8 +104,8 @@ switch($obj->args['type']) { | |||
105 | 'unspec-tx' => '000080', | 104 | 'unspec-tx' => '000080', |
106 | ); | 105 | ); |
107 | $obj->rrd_title = sprintf('Traffic on Vserver %s', $obj->args['pinstance']); | 106 | $obj->rrd_title = sprintf('Traffic on Vserver %s', $obj->args['pinstance']); |
108 | $obj->rrd_vertical = sprintf('%s per second', ucfirst($CONFIG['datasize'])); | 107 | $obj->rrd_vertical = sprintf('%s per second', ucfirst($CONFIG['network_datasize'])); |
109 | $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1; | 108 | $obj->scale = $CONFIG['network_datasize'] == 'bits' ? 8 : 1; |
110 | $obj->width = $width; | 109 | $obj->width = $width; |
111 | $obj->heigth = $heigth; | 110 | $obj->heigth = $heigth; |
112 | $obj->rrd_format = '%5.1lf%s'; | 111 | $obj->rrd_format = '%5.1lf%s'; |