aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'plugin')
-rw-r--r--plugin/apache.php6
-rw-r--r--plugin/df.php5
-rw-r--r--plugin/disk.php3
-rw-r--r--plugin/filecount.php3
-rw-r--r--plugin/interface.php4
-rw-r--r--plugin/libvirt.php7
-rw-r--r--plugin/memcached.php7
-rw-r--r--plugin/memory.php3
-rw-r--r--plugin/netlink.php4
-rw-r--r--plugin/postgresql.php3
-rw-r--r--plugin/processes.php18
-rw-r--r--plugin/swap.php3
-rw-r--r--plugin/vserver.php7
-rw-r--r--plugin/zfs_arc.php11
14 files changed, 33 insertions, 51 deletions
diff --git a/plugin/apache.php b/plugin/apache.php
index 71be4fe..c942255 100644
--- a/plugin/apache.php
+++ b/plugin/apache.php
@@ -19,15 +19,15 @@ switch ($obj->args['type']) {
19 case 'apache_bytes': 19 case 'apache_bytes':
20 $obj->data_sources = array('value'); 20 $obj->data_sources = array('value');
21 $obj->ds_names = array( 21 $obj->ds_names = array(
22 'value' => sprintf('%s/s', ucfirst($CONFIG['datasize'])), 22 'value' => sprintf('%s/s', ucfirst($CONFIG['network_datasize'])),
23 ); 23 );
24 $obj->colors = array( 24 $obj->colors = array(
25 'value' => '0000ff', 25 'value' => '0000ff',
26 ); 26 );
27 $obj->rrd_title = sprintf('Webserver Traffic%s', 27 $obj->rrd_title = sprintf('Webserver Traffic%s',
28 !empty($obj->args['pinstance']) ? ' ('.$obj->args['pinstance'].')' : ''); 28 !empty($obj->args['pinstance']) ? ' ('.$obj->args['pinstance'].')' : '');
29 $obj->rrd_vertical = sprintf('%s/s', ucfirst($CONFIG['datasize'])); 29 $obj->rrd_vertical = sprintf('%s/s', ucfirst($CONFIG['network_datasize']));
30 $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1; 30 $obj->scale = $CONFIG['network_datasize'] == 'bits' ? 8 : 1;
31 break; 31 break;
32 case 'apache_connections': 32 case 'apache_connections':
33 $obj->data_sources = array('value'); 33 $obj->data_sources = array('value');
diff --git a/plugin/df.php b/plugin/df.php
index 33dded9..b5c7e73 100644
--- a/plugin/df.php
+++ b/plugin/df.php
@@ -29,9 +29,8 @@ $obj->width = $width;
29$obj->heigth = $heigth; 29$obj->heigth = $heigth;
30 30
31$obj->rrd_title = sprintf('Free space (%s)', $obj->args['pinstance']); 31$obj->rrd_title = sprintf('Free space (%s)', $obj->args['pinstance']);
32$obj->rrd_vertical = ucfirst($CONFIG['datasize']); 32$obj->rrd_vertical = 'Bytes';
33$obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1; 33$obj->rrd_format = '%5.1lf%sB';
34$obj->rrd_format = '%5.1lf%s';
35 34
36# backwards compatibility 35# backwards compatibility
37if ($CONFIG['version'] < 5) { 36if ($CONFIG['version'] < 5) {
diff --git a/plugin/disk.php b/plugin/disk.php
index a776abd..e3a5f3d 100644
--- a/plugin/disk.php
+++ b/plugin/disk.php
@@ -33,9 +33,8 @@ switch($obj->args['type']) {
33 break; 33 break;
34 case 'disk_octets': 34 case 'disk_octets':
35 $obj->rrd_title = sprintf('Disk Traffic (%s)', $obj->args['pinstance']); 35 $obj->rrd_title = sprintf('Disk Traffic (%s)', $obj->args['pinstance']);
36 $obj->rrd_vertical = sprintf('%s per second', ucfirst($CONFIG['datasize'])); 36 $obj->rrd_vertical = 'Bytes per second';
37 $obj->rrd_format = '%5.1lf%s'; 37 $obj->rrd_format = '%5.1lf%s';
38 $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1;
39 break; 38 break;
40 case 'disk_ops': 39 case 'disk_ops':
41 $obj->rrd_title = sprintf('Disk Operations (%s)', $obj->args['pinstance']); 40 $obj->rrd_title = sprintf('Disk Operations (%s)', $obj->args['pinstance']);
diff --git a/plugin/filecount.php b/plugin/filecount.php
index 68545e7..2c318a9 100644
--- a/plugin/filecount.php
+++ b/plugin/filecount.php
@@ -23,8 +23,7 @@ switch($obj->args['type']) {
23 $obj->ds_names = array('value' => 'Size'); 23 $obj->ds_names = array('value' => 'Size');
24 $obj->colors = array('value' => '0000ff'); 24 $obj->colors = array('value' => '0000ff');
25 $obj->rrd_title = sprintf('Filecount: size (%s)', $obj->args['pinstance']); 25 $obj->rrd_title = sprintf('Filecount: size (%s)', $obj->args['pinstance']);
26 $obj->rrd_vertical = ucfirst($CONFIG['datasize']); 26 $obj->rrd_vertical = 'Bytes';
27 $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1;
28 break; 27 break;
29 case 'files': 28 case 'files':
30 $obj->ds_names = array('value' => 'Files'); 29 $obj->ds_names = array('value' => 'Files');
diff --git a/plugin/interface.php b/plugin/interface.php
index 107cb27..777f953 100644
--- a/plugin/interface.php
+++ b/plugin/interface.php
@@ -39,8 +39,8 @@ switch($obj->args['type']) {
39 break; 39 break;
40 case 'if_octets': 40 case 'if_octets':
41 $obj->rrd_title = sprintf('Interface Traffic (%s)', $obj->args[$instance]); 41 $obj->rrd_title = sprintf('Interface Traffic (%s)', $obj->args[$instance]);
42 $obj->rrd_vertical = sprintf('%s per second', ucfirst($CONFIG['datasize'])); 42 $obj->rrd_vertical = sprintf('%s per second', ucfirst($CONFIG['network_datasize']));
43 $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1; 43 $obj->scale = $CONFIG['network_datasize'] == 'bits' ? 8 : 1;
44 break; 44 break;
45 case 'if_packets': 45 case 'if_packets':
46 $obj->rrd_title = sprintf('Interface Packets (%s)', $obj->args[$instance]); 46 $obj->rrd_title = sprintf('Interface Packets (%s)', $obj->args[$instance]);
diff --git a/plugin/libvirt.php b/plugin/libvirt.php
index 971b5a7..004eb26 100644
--- a/plugin/libvirt.php
+++ b/plugin/libvirt.php
@@ -30,8 +30,7 @@ switch($obj->args['type']) {
30 'write' => '00b000', 30 'write' => '00b000',
31 ); 31 );
32 $obj->rrd_title = sprintf('Disk Traffic (%s)', $obj->args['tinstance']); 32 $obj->rrd_title = sprintf('Disk Traffic (%s)', $obj->args['tinstance']);
33 $obj->rrd_vertical = sprintf('%s per second', ucfirst($CONFIG['datasize'])); 33 $obj->rrd_vertical = 'Bytes per second';
34 $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1;
35 $obj->rrd_format = '%5.1lf%s'; 34 $obj->rrd_format = '%5.1lf%s';
36 break; 35 break;
37 case 'disk_ops': 36 case 'disk_ops':
@@ -85,8 +84,8 @@ switch($obj->args['type']) {
85 'tx' => '00b000', 84 'tx' => '00b000',
86 ); 85 );
87 $obj->rrd_title = sprintf('Interface Traffic (%s)', $obj->args['tinstance']); 86 $obj->rrd_title = sprintf('Interface Traffic (%s)', $obj->args['tinstance']);
88 $obj->rrd_vertical = sprintf('%s per second', ucfirst($CONFIG['datasize'])); 87 $obj->rrd_vertical = sprintf('%s per second', ucfirst($CONFIG['network_datasize']));
89 $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1; 88 $obj->scale = $CONFIG['network_datasize'] == 'bits' ? 8 : 1;
90 break; 89 break;
91 case 'if_packets': 90 case 'if_packets':
92 $obj->data_sources = array('rx', 'tx'); 91 $obj->data_sources = array('rx', 'tx');
diff --git a/plugin/memcached.php b/plugin/memcached.php
index 2230f3f..60887bc 100644
--- a/plugin/memcached.php
+++ b/plugin/memcached.php
@@ -37,8 +37,7 @@ switch(GET('t')) {
37 'free' => '0000ff', 37 'free' => '0000ff',
38 ); 38 );
39 $obj->rrd_title = 'Memcached Memory Usage'; 39 $obj->rrd_title = 'Memcached Memory Usage';
40 $obj->rrd_vertical = ucfirst($CONFIG['datasize']); 40 $obj->rrd_vertical = 'bytes';
41 $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1;
42 break; 41 break;
43 42
44# memcached_command-(flush|get|set).rrd 43# memcached_command-(flush|get|set).rrd
@@ -105,8 +104,8 @@ switch(GET('t')) {
105 'tx' => '00b000', 104 'tx' => '00b000',
106 ); 105 );
107 $obj->rrd_title = 'Memcached Network Traffic'; 106 $obj->rrd_title = 'Memcached Network Traffic';
108 $obj->rrd_vertical = ucfirst($CONFIG['datasize']); 107 $obj->rrd_vertical = ucfirst($CONFIG['network_datasize']);
109 $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1; 108 $obj->scale = $CONFIG['network_datasize'] == 'bits' ? 8 : 1;
110 break; 109 break;
111# memcached_ops-(evictions|hits|misses).rrd 110# memcached_ops-(evictions|hits|misses).rrd
112 case 'memcached_ops': 111 case 'memcached_ops':
diff --git a/plugin/memory.php b/plugin/memory.php
index afccc55..14779e2 100644
--- a/plugin/memory.php
+++ b/plugin/memory.php
@@ -33,8 +33,7 @@ $obj->width = $width;
33$obj->heigth = $heigth; 33$obj->heigth = $heigth;
34 34
35$obj->rrd_title = 'Physical memory utilization'; 35$obj->rrd_title = 'Physical memory utilization';
36$obj->rrd_vertical = ucfirst($CONFIG['datasize']); 36$obj->rrd_vertical = 'Bytes';
37$obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1;
38$obj->rrd_format = '%5.1lf%s'; 37$obj->rrd_format = '%5.1lf%s';
39 38
40collectd_flush($obj->identifiers); 39collectd_flush($obj->identifiers);
diff --git a/plugin/netlink.php b/plugin/netlink.php
index 77c0c48..146545e 100644
--- a/plugin/netlink.php
+++ b/plugin/netlink.php
@@ -64,8 +64,8 @@ switch($obj->args['type']) {
64 'tx' => '00b000', 64 'tx' => '00b000',
65 ); 65 );
66 $obj->rrd_title = sprintf('Interface Traffic (%s)', $obj->args['pinstance']); 66 $obj->rrd_title = sprintf('Interface Traffic (%s)', $obj->args['pinstance']);
67 $obj->rrd_vertical = sprintf('%s/s', ucfirst($CONFIG['datasize'])); 67 $obj->rrd_vertical = sprintf('%s/s', ucfirst($CONFIG['network_datasize']));
68 $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1; 68 $obj->scale = $CONFIG['network_datasize'] == 'bits' ? 8 : 1;
69 break; 69 break;
70 case 'if_packets': 70 case 'if_packets':
71 $obj->data_sources = array('rx', 'tx'); 71 $obj->data_sources = array('rx', 'tx');
diff --git a/plugin/postgresql.php b/plugin/postgresql.php
index ed984a6..1eadc8d 100644
--- a/plugin/postgresql.php
+++ b/plugin/postgresql.php
@@ -51,8 +51,7 @@ switch($obj->args['type']) {
51 ); 51 );
52 $obj->rrd_title = sprintf('PostgreSQL DB size (%s)', 52 $obj->rrd_title = sprintf('PostgreSQL DB size (%s)',
53 !empty($obj->args['pinstance']) ? $obj->args['pinstance'] : ''); 53 !empty($obj->args['pinstance']) ? $obj->args['pinstance'] : '');
54 $obj->rrd_vertical = ucfirst($CONFIG['datasize']); 54 $obj->rrd_vertical = 'Bytes';
55 $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1;
56 break; 55 break;
57 case 'pg_n_tup_c': 56 case 'pg_n_tup_c':
58 $obj->order = array( 57 $obj->order = array(
diff --git a/plugin/processes.php b/plugin/processes.php
index c66d3fb..dca00b7 100644
--- a/plugin/processes.php
+++ b/plugin/processes.php
@@ -63,8 +63,7 @@ switch($obj->args['type'])
63 'value' => '0000ff', 63 'value' => '0000ff',
64 ); 64 );
65 $obj->rrd_title = sprintf('Text Resident Set (%s)', $obj->args['pinstance']); 65 $obj->rrd_title = sprintf('Text Resident Set (%s)', $obj->args['pinstance']);
66 $obj->rrd_vertical = ucfirst($CONFIG['datasize']); 66 $obj->rrd_vertical = 'Bytes';
67 $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1;
68 break; 67 break;
69 68
70 case 'ps_count': 69 case 'ps_count':
@@ -106,8 +105,7 @@ switch($obj->args['type'])
106 'write' => '00b000', 105 'write' => '00b000',
107 ); 106 );
108 $obj->rrd_title = sprintf('Disk Traffic (%s)', $obj->args['pinstance']); 107 $obj->rrd_title = sprintf('Disk Traffic (%s)', $obj->args['pinstance']);
109 $obj->rrd_vertical = sprintf('%s per second', ucfirst($CONFIG['datasize'])); 108 $obj->rrd_vertical = 'Bytes per second';
110 $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1;
111 break; 109 break;
112 110
113 case 'ps_disk_ops': 111 case 'ps_disk_ops':
@@ -132,8 +130,7 @@ switch($obj->args['type'])
132 'value' => '0000ff', 130 'value' => '0000ff',
133 ); 131 );
134 $obj->rrd_title = sprintf('Data Resident Set (%s)', $obj->args['pinstance']); 132 $obj->rrd_title = sprintf('Data Resident Set (%s)', $obj->args['pinstance']);
135 $obj->rrd_vertical = ucfirst($CONFIG['datasize']); 133 $obj->rrd_vertical = 'Bytes';
136 $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1;
137 break; 134 break;
138 135
139 case 'ps_pagefaults': 136 case 'ps_pagefaults':
@@ -158,8 +155,7 @@ switch($obj->args['type'])
158 'value' => '0000ff', 155 'value' => '0000ff',
159 ); 156 );
160 $obj->rrd_title = sprintf('Resident Segment Size (%s)', $obj->args['pinstance']); 157 $obj->rrd_title = sprintf('Resident Segment Size (%s)', $obj->args['pinstance']);
161 $obj->rrd_vertical = ucfirst($CONFIG['datasize']); 158 $obj->rrd_vertical = 'Bytes';
162 $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1;
163 break; 159 break;
164 160
165 case 'ps_stacksize': 161 case 'ps_stacksize':
@@ -170,8 +166,7 @@ switch($obj->args['type'])
170 'value' => '0000ff', 166 'value' => '0000ff',
171 ); 167 );
172 $obj->rrd_title = sprintf('Stacksize (%s)', $obj->args['pinstance']); 168 $obj->rrd_title = sprintf('Stacksize (%s)', $obj->args['pinstance']);
173 $obj->rrd_vertical = ucfirst($CONFIG['datasize']); 169 $obj->rrd_vertical = 'Bytes';
174 $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1;
175 break; 170 break;
176 171
177 case 'ps_vm': 172 case 'ps_vm':
@@ -182,8 +177,7 @@ switch($obj->args['type'])
182 'value' => '0000ff', 177 'value' => '0000ff',
183 ); 178 );
184 $obj->rrd_title = sprintf('Virtual Memory (%s)', $obj->args['pinstance']); 179 $obj->rrd_title = sprintf('Virtual Memory (%s)', $obj->args['pinstance']);
185 $obj->rrd_vertical = ucfirst($CONFIG['datasize']); 180 $obj->rrd_vertical = 'Bytes';
186 $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1;
187 break; 181 break;
188 182
189} 183}
diff --git a/plugin/swap.php b/plugin/swap.php
index dee5692..c24d90b 100644
--- a/plugin/swap.php
+++ b/plugin/swap.php
@@ -27,8 +27,7 @@ switch(GET('t')) {
27 'used' => 'ff0000', 27 'used' => 'ff0000',
28 ); 28 );
29 $obj->rrd_title = 'Swap utilization'; 29 $obj->rrd_title = 'Swap utilization';
30 $obj->rrd_vertical = ucfirst($CONFIG['datasize']); 30 $obj->rrd_vertical = 'Bytes';
31 $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1;
32 break; 31 break;
33 case 'swap_io': 32 case 'swap_io':
34 require_once 'type/GenericIO.class.php'; 33 require_once 'type/GenericIO.class.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']) {
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';
diff --git a/plugin/zfs_arc.php b/plugin/zfs_arc.php
index 1cc7e81..d40912d 100644
--- a/plugin/zfs_arc.php
+++ b/plugin/zfs_arc.php
@@ -60,8 +60,7 @@ switch($obj->args['type']) {
60 'maxlimit', 60 'maxlimit',
61 ); 61 );
62 $obj->rrd_title = 'Arc size'; 62 $obj->rrd_title = 'Arc size';
63 $obj->rrd_vertical = ucfirst($CONFIG['datasize']); 63 $obj->rrd_vertical = 'bytes';
64 $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1;
65 break; 64 break;
66 case 'arc_l2_bytes': 65 case 'arc_l2_bytes':
67 $obj->data_sources = array( 66 $obj->data_sources = array(
@@ -77,22 +76,20 @@ switch($obj->args['type']) {
77 'read' => '0000ff', 76 'read' => '0000ff',
78 ); 77 );
79 $obj->rrd_title = 'Arc L2 bytes'; 78 $obj->rrd_title = 'Arc L2 bytes';
80 $obj->rrd_vertical = ucfirst($CONFIG['datasize']); 79 $obj->rrd_vertical = 'bytes';
81 $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1;
82 break; 80 break;
83 case 'arc_l2_size': 81 case 'arc_l2_size':
84 $obj->data_sources = array( 82 $obj->data_sources = array(
85 'value', 83 'value',
86 ); 84 );
87 $obj->ds_names = array( 85 $obj->ds_names = array(
88 'value' => ucfirst($CONFIG['datasize']), 86 'value' => 'Bytes',
89 ); 87 );
90 $obj->colors = array( 88 $obj->colors = array(
91 'value' => '0000ff', 89 'value' => '0000ff',
92 ); 90 );
93 $obj->rrd_title = 'Arc L2 size'; 91 $obj->rrd_title = 'Arc L2 size';
94 $obj->rrd_vertical = ucfirst($CONFIG['datasize']); 92 $obj->rrd_vertical = 'bytes';
95 $obj->scale = $CONFIG['datasize'] == 'bits' ? 8 : 1;
96 break; 93 break;
97 case 'arc_ratio': 94 case 'arc_ratio':
98 $obj->data_sources = array('value'); 95 $obj->data_sources = array('value');