diff options
author | Pim van den Berg | 2014-05-03 18:15:12 +0200 |
---|---|---|
committer | Pim van den Berg | 2014-05-03 19:21:36 +0200 |
commit | edae75c21a8f657dd6cc9ace9e8e844ef337a951 (patch) | |
tree | da0c2b4a1ef35a3d2d8c129925e257f6a6f7fbe3 | |
parent | type/base: set default values for rrd_title and rrd_format (diff) | |
download | apt-panopticon_cgp-edae75c21a8f657dd6cc9ace9e8e844ef337a951.zip apt-panopticon_cgp-edae75c21a8f657dd6cc9ace9e8e844ef337a951.tar.gz apt-panopticon_cgp-edae75c21a8f657dd6cc9ace9e8e844ef337a951.tar.bz2 apt-panopticon_cgp-edae75c21a8f657dd6cc9ace9e8e844ef337a951.tar.xz |
rename ds_names and dsname to legend
This had nothing to do with an RRD data source.
Diffstat (limited to '')
45 files changed, 150 insertions, 150 deletions
diff --git a/plugin/aggregation.php b/plugin/aggregation.php index 2a74403..0d28fae 100644 --- a/plugin/aggregation.php +++ b/plugin/aggregation.php | |||
@@ -15,7 +15,7 @@ switch($pi[0]) { | |||
15 | $obj = new Type_GenericStacked($CONFIG, $_GET); | 15 | $obj = new Type_GenericStacked($CONFIG, $_GET); |
16 | $obj->data_sources = array('value'); | 16 | $obj->data_sources = array('value'); |
17 | $obj->order = array('idle', 'nice', 'user', 'wait', 'system', 'softirq', 'interrupt', 'steal'); | 17 | $obj->order = array('idle', 'nice', 'user', 'wait', 'system', 'softirq', 'interrupt', 'steal'); |
18 | $obj->ds_names = array( | 18 | $obj->legend = array( |
19 | 'idle' => 'Idle', | 19 | 'idle' => 'Idle', |
20 | 'nice' => 'Nice', | 20 | 'nice' => 'Nice', |
21 | 'user' => 'User', | 21 | 'user' => 'User', |
diff --git a/plugin/apache.php b/plugin/apache.php index df7fe49..6fa9963 100644 --- a/plugin/apache.php +++ b/plugin/apache.php | |||
@@ -17,7 +17,7 @@ $obj = new Type_Default($CONFIG, $_GET); | |||
17 | switch ($obj->args['type']) { | 17 | switch ($obj->args['type']) { |
18 | case 'apache_bytes': | 18 | case 'apache_bytes': |
19 | $obj->data_sources = array('value'); | 19 | $obj->data_sources = array('value'); |
20 | $obj->ds_names = array( | 20 | $obj->legend = array( |
21 | 'value' => sprintf('%s/s', ucfirst($CONFIG['network_datasize'])), | 21 | 'value' => sprintf('%s/s', ucfirst($CONFIG['network_datasize'])), |
22 | ); | 22 | ); |
23 | $obj->colors = array( | 23 | $obj->colors = array( |
@@ -30,7 +30,7 @@ switch ($obj->args['type']) { | |||
30 | break; | 30 | break; |
31 | case 'apache_connections': | 31 | case 'apache_connections': |
32 | $obj->data_sources = array('value'); | 32 | $obj->data_sources = array('value'); |
33 | $obj->ds_names = array( | 33 | $obj->legend = array( |
34 | 'value' => 'Conns/s', | 34 | 'value' => 'Conns/s', |
35 | ); | 35 | ); |
36 | $obj->colors = array( | 36 | $obj->colors = array( |
@@ -42,7 +42,7 @@ switch ($obj->args['type']) { | |||
42 | break; | 42 | break; |
43 | case 'apache_idle_workers': | 43 | case 'apache_idle_workers': |
44 | $obj->data_sources = array('value'); | 44 | $obj->data_sources = array('value'); |
45 | $obj->ds_names = array( | 45 | $obj->legend = array( |
46 | 'value' => 'Workers', | 46 | 'value' => 'Workers', |
47 | ); | 47 | ); |
48 | $obj->colors = array( | 48 | $obj->colors = array( |
@@ -54,7 +54,7 @@ switch ($obj->args['type']) { | |||
54 | break; | 54 | break; |
55 | case 'apache_requests': | 55 | case 'apache_requests': |
56 | $obj->data_sources = array('value'); | 56 | $obj->data_sources = array('value'); |
57 | $obj->ds_names = array( | 57 | $obj->legend = array( |
58 | 'value' => 'Requests/s', | 58 | 'value' => 'Requests/s', |
59 | ); | 59 | ); |
60 | $obj->colors = array( | 60 | $obj->colors = array( |
@@ -93,7 +93,7 @@ switch ($obj->args['type']) { | |||
93 | 'read', | 93 | 'read', |
94 | 'request_start', | 94 | 'request_start', |
95 | ); | 95 | ); |
96 | $obj->ds_names = array( | 96 | $obj->legend = array( |
97 | 'open' => 'Open (empty)', | 97 | 'open' => 'Open (empty)', |
98 | 'waiting' => 'Waiting', | 98 | 'waiting' => 'Waiting', |
99 | 'starting' => 'Starting up', | 99 | 'starting' => 'Starting up', |
@@ -154,9 +154,9 @@ $obj->rrd_format = '%5.1lf'; | |||
154 | # backwards compatibility | 154 | # backwards compatibility |
155 | if ($CONFIG['version'] < 5) { | 155 | if ($CONFIG['version'] < 5) { |
156 | $obj->data_sources = array('count'); | 156 | $obj->data_sources = array('count'); |
157 | if (count($obj->ds_names) == 1) { | 157 | if (count($obj->legend) == 1) { |
158 | $obj->ds_names['count'] = $obj->ds_names['value']; | 158 | $obj->legend['count'] = $obj->legend['value']; |
159 | unset($obj->ds_names['value']); | 159 | unset($obj->legend['value']); |
160 | } | 160 | } |
161 | if (count($obj->colors) == 1) { | 161 | if (count($obj->colors) == 1) { |
162 | $obj->colors['count'] = $obj->colors['value']; | 162 | $obj->colors['count'] = $obj->colors['value']; |
diff --git a/plugin/apcups.php b/plugin/apcups.php index 626b8f4..853f0ed 100644 --- a/plugin/apcups.php +++ b/plugin/apcups.php | |||
@@ -21,42 +21,42 @@ $obj = new Type_Default($CONFIG, $_GET); | |||
21 | switch($obj->args['type']) { | 21 | switch($obj->args['type']) { |
22 | case 'charge': | 22 | case 'charge': |
23 | $obj->data_sources = array('value'); | 23 | $obj->data_sources = array('value'); |
24 | $obj->ds_names = array('value' => 'Charge'); | 24 | $obj->legend = array('value' => 'Charge'); |
25 | $obj->colors = array('value' => '0000f0'); | 25 | $obj->colors = array('value' => '0000f0'); |
26 | $obj->rrd_title = sprintf('UPS Charge'); | 26 | $obj->rrd_title = sprintf('UPS Charge'); |
27 | $obj->rrd_vertical = 'Ampere hours'; | 27 | $obj->rrd_vertical = 'Ampere hours'; |
28 | break; | 28 | break; |
29 | case 'frequency': | 29 | case 'frequency': |
30 | $obj->data_sources = array('value'); | 30 | $obj->data_sources = array('value'); |
31 | $obj->ds_names = array('value' => 'Input Frequency'); | 31 | $obj->legend = array('value' => 'Input Frequency'); |
32 | $obj->colors = array('value' => '0000f0'); | 32 | $obj->colors = array('value' => '0000f0'); |
33 | $obj->rrd_title = sprintf('UPS Input Frequency'); | 33 | $obj->rrd_title = sprintf('UPS Input Frequency'); |
34 | $obj->rrd_vertical = 'Hertz'; | 34 | $obj->rrd_vertical = 'Hertz'; |
35 | break; | 35 | break; |
36 | case 'percent': | 36 | case 'percent': |
37 | $obj->data_sources = array('value'); | 37 | $obj->data_sources = array('value'); |
38 | $obj->ds_names = array('value' => 'Load'); | 38 | $obj->legend = array('value' => 'Load'); |
39 | $obj->colors = array('value' => '0000f0'); | 39 | $obj->colors = array('value' => '0000f0'); |
40 | $obj->rrd_title = sprintf('UPS Load'); | 40 | $obj->rrd_title = sprintf('UPS Load'); |
41 | $obj->rrd_vertical = 'Percent'; | 41 | $obj->rrd_vertical = 'Percent'; |
42 | break; | 42 | break; |
43 | case 'temperature': | 43 | case 'temperature': |
44 | $obj->data_sources = array('value'); | 44 | $obj->data_sources = array('value'); |
45 | $obj->ds_names = array('value' => 'Temperature'); | 45 | $obj->legend = array('value' => 'Temperature'); |
46 | $obj->colors = array('value' => '0000f0'); | 46 | $obj->colors = array('value' => '0000f0'); |
47 | $obj->rrd_title = sprintf('UPS Temperature'); | 47 | $obj->rrd_title = sprintf('UPS Temperature'); |
48 | $obj->rrd_vertical = 'Celsius'; | 48 | $obj->rrd_vertical = 'Celsius'; |
49 | break; | 49 | break; |
50 | case 'timeleft': | 50 | case 'timeleft': |
51 | $obj->data_sources = array('value'); | 51 | $obj->data_sources = array('value'); |
52 | $obj->ds_names = array('value' => 'Time Left'); | 52 | $obj->legend = array('value' => 'Time Left'); |
53 | $obj->colors = array('value' => '0000f0'); | 53 | $obj->colors = array('value' => '0000f0'); |
54 | $obj->rrd_title = sprintf('UPS Time Left'); | 54 | $obj->rrd_title = sprintf('UPS Time Left'); |
55 | $obj->rrd_vertical = 'Seconds'; | 55 | $obj->rrd_vertical = 'Seconds'; |
56 | break; | 56 | break; |
57 | case 'voltage': | 57 | case 'voltage': |
58 | $obj->order = array('battery', 'input', 'output'); | 58 | $obj->order = array('battery', 'input', 'output'); |
59 | $obj->ds_names = array( | 59 | $obj->legend = array( |
60 | 'battery' => 'Battery Voltage', | 60 | 'battery' => 'Battery Voltage', |
61 | 'input' => 'Input Voltage', | 61 | 'input' => 'Input Voltage', |
62 | 'output' => 'Output Voltage' | 62 | 'output' => 'Output Voltage' |
@@ -78,8 +78,8 @@ if ($CONFIG['version'] < 5 && | |||
78 | 78 | ||
79 | $obj->data_sources = array($obj->args['type']); | 79 | $obj->data_sources = array($obj->args['type']); |
80 | 80 | ||
81 | $obj->ds_names[$obj->args['type']] = $obj->ds_names['value']; | 81 | $obj->legend[$obj->args['type']] = $obj->legend['value']; |
82 | unset($obj->ds_names['value']); | 82 | unset($obj->legend['value']); |
83 | 83 | ||
84 | $obj->colors[$obj->args['type']] = $obj->colors['value']; | 84 | $obj->colors[$obj->args['type']] = $obj->colors['value']; |
85 | unset($obj->colors['value']); | 85 | unset($obj->colors['value']); |
diff --git a/plugin/battery.php b/plugin/battery.php index 631776b..fc91955 100644 --- a/plugin/battery.php +++ b/plugin/battery.php | |||
@@ -17,17 +17,17 @@ $obj->colors = array( | |||
17 | ); | 17 | ); |
18 | switch($obj->args['type']) { | 18 | switch($obj->args['type']) { |
19 | case 'charge': | 19 | case 'charge': |
20 | $obj->ds_names = array('value' => 'Charge'); | 20 | $obj->legend = array('value' => 'Charge'); |
21 | $obj->rrd_title = sprintf('Charge (Battery %s)', $obj->args['pinstance']); | 21 | $obj->rrd_title = sprintf('Charge (Battery %s)', $obj->args['pinstance']); |
22 | $obj->rrd_vertical = 'Ampere hours'; | 22 | $obj->rrd_vertical = 'Ampere hours'; |
23 | break; | 23 | break; |
24 | case 'current': | 24 | case 'current': |
25 | $obj->ds_names = array('value' => 'Current'); | 25 | $obj->legend = array('value' => 'Current'); |
26 | $obj->rrd_title = sprintf('Current (Battery %s)', $obj->args['pinstance']); | 26 | $obj->rrd_title = sprintf('Current (Battery %s)', $obj->args['pinstance']); |
27 | $obj->rrd_vertical = 'Ampere'; | 27 | $obj->rrd_vertical = 'Ampere'; |
28 | break; | 28 | break; |
29 | case 'voltage': | 29 | case 'voltage': |
30 | $obj->ds_names = array('value' => 'Voltage'); | 30 | $obj->legend = array('value' => 'Voltage'); |
31 | $obj->rrd_title = sprintf('Voltage (Battery %s)', $obj->args['pinstance']); | 31 | $obj->rrd_title = sprintf('Voltage (Battery %s)', $obj->args['pinstance']); |
32 | $obj->rrd_vertical = 'Volt'; | 32 | $obj->rrd_vertical = 'Volt'; |
33 | break; | 33 | break; |
diff --git a/plugin/conntrack.php b/plugin/conntrack.php index 6e2bba0..efd562c 100644 --- a/plugin/conntrack.php +++ b/plugin/conntrack.php | |||
@@ -10,7 +10,7 @@ require_once 'type/Default.class.php'; | |||
10 | 10 | ||
11 | $obj = new Type_Default($CONFIG, $_GET); | 11 | $obj = new Type_Default($CONFIG, $_GET); |
12 | $obj->data_sources = array('value'); | 12 | $obj->data_sources = array('value'); |
13 | $obj->ds_names = array( | 13 | $obj->legend = array( |
14 | 'value' => 'Conntrack entries', | 14 | 'value' => 'Conntrack entries', |
15 | ); | 15 | ); |
16 | $obj->colors = array( | 16 | $obj->colors = array( |
@@ -25,8 +25,8 @@ $obj->rrd_format = '%.1lf'; | |||
25 | if ($CONFIG['version'] < 5) { | 25 | if ($CONFIG['version'] < 5) { |
26 | $obj->data_sources = array('entropy'); | 26 | $obj->data_sources = array('entropy'); |
27 | 27 | ||
28 | $obj->ds_names['entropy'] = $obj->ds_names['value']; | 28 | $obj->legend['entropy'] = $obj->legend['value']; |
29 | unset($obj->ds_names['value']); | 29 | unset($obj->legend['value']); |
30 | 30 | ||
31 | $obj->colors['entropy'] = $obj->colors['value']; | 31 | $obj->colors['entropy'] = $obj->colors['value']; |
32 | unset($obj->colors['value']); | 32 | unset($obj->colors['value']); |
diff --git a/plugin/contextswitch.php b/plugin/contextswitch.php index 71f6d9d..24ba7f2 100644 --- a/plugin/contextswitch.php +++ b/plugin/contextswitch.php | |||
@@ -10,7 +10,7 @@ require_once 'type/Default.class.php'; | |||
10 | 10 | ||
11 | $obj = new Type_Default($CONFIG, $_GET); | 11 | $obj = new Type_Default($CONFIG, $_GET); |
12 | $obj->data_sources = array('value'); | 12 | $obj->data_sources = array('value'); |
13 | $obj->ds_names = array( | 13 | $obj->legend = array( |
14 | 'value' => 'Context switches', | 14 | 'value' => 'Context switches', |
15 | ); | 15 | ); |
16 | $obj->colors = array( | 16 | $obj->colors = array( |
@@ -24,8 +24,8 @@ $obj->rrd_format = '%4.0lf'; | |||
24 | if ($CONFIG['version'] < 5) { | 24 | if ($CONFIG['version'] < 5) { |
25 | $obj->data_sources = array('contextswitches'); | 25 | $obj->data_sources = array('contextswitches'); |
26 | 26 | ||
27 | $obj->ds_names['contextswitches'] = $obj->ds_names['value']; | 27 | $obj->legend['contextswitches'] = $obj->legend['value']; |
28 | unset($obj->ds_names['value']); | 28 | unset($obj->legend['value']); |
29 | 29 | ||
30 | $obj->colors['contextswitches'] = $obj->colors['value']; | 30 | $obj->colors['contextswitches'] = $obj->colors['value']; |
31 | unset($obj->colors['value']); | 31 | unset($obj->colors['value']); |
diff --git a/plugin/cpu.php b/plugin/cpu.php index 76914a7..2965c9e 100644 --- a/plugin/cpu.php +++ b/plugin/cpu.php | |||
@@ -19,7 +19,7 @@ require_once 'type/GenericStacked.class.php'; | |||
19 | $obj = new Type_GenericStacked($CONFIG, $_GET); | 19 | $obj = new Type_GenericStacked($CONFIG, $_GET); |
20 | $obj->data_sources = array('value'); | 20 | $obj->data_sources = array('value'); |
21 | $obj->order = array('idle', 'nice', 'user', 'wait', 'system', 'softirq', 'interrupt', 'steal'); | 21 | $obj->order = array('idle', 'nice', 'user', 'wait', 'system', 'softirq', 'interrupt', 'steal'); |
22 | $obj->ds_names = array( | 22 | $obj->legend = array( |
23 | 'idle' => 'Idle', | 23 | 'idle' => 'Idle', |
24 | 'nice' => 'Nice', | 24 | 'nice' => 'Nice', |
25 | 'user' => 'User', | 25 | 'user' => 'User', |
diff --git a/plugin/df.php b/plugin/df.php index f6d861b..2c0dfd8 100644 --- a/plugin/df.php +++ b/plugin/df.php | |||
@@ -14,7 +14,7 @@ require_once 'type/GenericStacked.class.php'; | |||
14 | $obj = new Type_GenericStacked($CONFIG, $_GET); | 14 | $obj = new Type_GenericStacked($CONFIG, $_GET); |
15 | $obj->data_sources = array('value'); | 15 | $obj->data_sources = array('value'); |
16 | $obj->order = array('reserved', 'free', 'used'); | 16 | $obj->order = array('reserved', 'free', 'used'); |
17 | $obj->ds_names = array( | 17 | $obj->legend = array( |
18 | 'reserved' => 'Reserved', | 18 | 'reserved' => 'Reserved', |
19 | 'free' => 'Free', | 19 | 'free' => 'Free', |
20 | 'used' => 'Used', | 20 | 'used' => 'Used', |
diff --git a/plugin/disk.php b/plugin/disk.php index 27a4acd..28f5eac 100644 --- a/plugin/disk.php +++ b/plugin/disk.php | |||
@@ -14,7 +14,7 @@ require_once 'type/GenericIO.class.php'; | |||
14 | 14 | ||
15 | $obj = new Type_GenericIO($CONFIG, $_GET); | 15 | $obj = new Type_GenericIO($CONFIG, $_GET); |
16 | $obj->data_sources = array('read', 'write'); | 16 | $obj->data_sources = array('read', 'write'); |
17 | $obj->ds_names = array( | 17 | $obj->legend = array( |
18 | 'read' => 'Read', | 18 | 'read' => 'Read', |
19 | 'write' => 'Written', | 19 | 'write' => 'Written', |
20 | ); | 20 | ); |
diff --git a/plugin/dns.php b/plugin/dns.php index cb9bb02..0c44097 100644 --- a/plugin/dns.php +++ b/plugin/dns.php | |||
@@ -20,7 +20,7 @@ switch($obj->args['type']) { | |||
20 | 'queries', | 20 | 'queries', |
21 | 'responses', | 21 | 'responses', |
22 | ); | 22 | ); |
23 | $obj->ds_names = array( | 23 | $obj->legend = array( |
24 | 'queries' => 'Queries', | 24 | 'queries' => 'Queries', |
25 | 'responses' => 'Responses', | 25 | 'responses' => 'Responses', |
26 | ); | 26 | ); |
diff --git a/plugin/entropy.php b/plugin/entropy.php index 0433a4f..0170335 100644 --- a/plugin/entropy.php +++ b/plugin/entropy.php | |||
@@ -10,7 +10,7 @@ require_once 'type/Default.class.php'; | |||
10 | 10 | ||
11 | $obj = new Type_Default($CONFIG, $_GET); | 11 | $obj = new Type_Default($CONFIG, $_GET); |
12 | $obj->data_sources = array('value'); | 12 | $obj->data_sources = array('value'); |
13 | $obj->ds_names = array( | 13 | $obj->legend = array( |
14 | 'value' => 'Entropy bits', | 14 | 'value' => 'Entropy bits', |
15 | ); | 15 | ); |
16 | $obj->colors = array( | 16 | $obj->colors = array( |
@@ -24,8 +24,8 @@ $obj->rrd_format = '%4.0lf'; | |||
24 | if ($CONFIG['version'] < 5) { | 24 | if ($CONFIG['version'] < 5) { |
25 | $obj->data_sources = array('entropy'); | 25 | $obj->data_sources = array('entropy'); |
26 | 26 | ||
27 | $obj->ds_names['entropy'] = $obj->ds_names['value']; | 27 | $obj->legend['entropy'] = $obj->legend['value']; |
28 | unset($obj->ds_names['value']); | 28 | unset($obj->legend['value']); |
29 | 29 | ||
30 | $obj->colors['entropy'] = $obj->colors['value']; | 30 | $obj->colors['entropy'] = $obj->colors['value']; |
31 | unset($obj->colors['value']); | 31 | unset($obj->colors['value']); |
diff --git a/plugin/filecount.php b/plugin/filecount.php index 5fa524d..ead8df8 100644 --- a/plugin/filecount.php +++ b/plugin/filecount.php | |||
@@ -17,13 +17,13 @@ $obj->data_sources = array('value'); | |||
17 | 17 | ||
18 | switch($obj->args['type']) { | 18 | switch($obj->args['type']) { |
19 | case 'bytes': | 19 | case 'bytes': |
20 | $obj->ds_names = array('value' => 'Size'); | 20 | $obj->legend = array('value' => 'Size'); |
21 | $obj->colors = array('value' => '0000ff'); | 21 | $obj->colors = array('value' => '0000ff'); |
22 | $obj->rrd_title = sprintf('Filecount: size (%s)', $obj->args['pinstance']); | 22 | $obj->rrd_title = sprintf('Filecount: size (%s)', $obj->args['pinstance']); |
23 | $obj->rrd_vertical = 'Bytes'; | 23 | $obj->rrd_vertical = 'Bytes'; |
24 | break; | 24 | break; |
25 | case 'files': | 25 | case 'files': |
26 | $obj->ds_names = array('value' => 'Files'); | 26 | $obj->legend = array('value' => 'Files'); |
27 | $obj->colors = array('value' => 'f0a000'); | 27 | $obj->colors = array('value' => 'f0a000'); |
28 | $obj->rrd_title = sprintf('Filecount: number of files (%s)', $obj->args['pinstance']); | 28 | $obj->rrd_title = sprintf('Filecount: number of files (%s)', $obj->args['pinstance']); |
29 | $obj->rrd_vertical = 'Files'; | 29 | $obj->rrd_vertical = 'Files'; |
diff --git a/plugin/hddtemp.php b/plugin/hddtemp.php index 1d366a9..9e88b6a 100644 --- a/plugin/hddtemp.php +++ b/plugin/hddtemp.php | |||
@@ -9,7 +9,7 @@ require_once 'type/Default.class.php'; | |||
9 | # hddtemp/temperature-<disk>.rrd | 9 | # hddtemp/temperature-<disk>.rrd |
10 | 10 | ||
11 | $obj = new Type_Default($CONFIG, $_GET); | 11 | $obj = new Type_Default($CONFIG, $_GET); |
12 | $obj->ds_names = array('temperature' => 'Temperature'); | 12 | $obj->legend = array('temperature' => 'Temperature'); |
13 | $obj->rrd_title = 'HDD Temperature'; | 13 | $obj->rrd_title = 'HDD Temperature'; |
14 | $obj->rrd_vertical = '°C'; | 14 | $obj->rrd_vertical = '°C'; |
15 | $obj->rrd_format = '%.1lf'; | 15 | $obj->rrd_format = '%.1lf'; |
diff --git a/plugin/interface.php b/plugin/interface.php index cc8c5ce..5728c07 100644 --- a/plugin/interface.php +++ b/plugin/interface.php | |||
@@ -18,7 +18,7 @@ require_once 'type/GenericIO.class.php'; | |||
18 | 18 | ||
19 | $obj = new Type_GenericIO($CONFIG, $_GET); | 19 | $obj = new Type_GenericIO($CONFIG, $_GET); |
20 | $obj->data_sources = array('rx', 'tx'); | 20 | $obj->data_sources = array('rx', 'tx'); |
21 | $obj->ds_names = array( | 21 | $obj->legend = array( |
22 | 'rx' => 'Receive', | 22 | 'rx' => 'Receive', |
23 | 'tx' => 'Transmit', | 23 | 'tx' => 'Transmit', |
24 | ); | 24 | ); |
diff --git a/plugin/ipmi.php b/plugin/ipmi.php index 8e6b7bf..5593daf 100644 --- a/plugin/ipmi.php +++ b/plugin/ipmi.php | |||
@@ -19,7 +19,7 @@ require_once 'type/Default.class.php'; | |||
19 | # voltage-VBAT system_board (7.1).rrd | 19 | # voltage-VBAT system_board (7.1).rrd |
20 | 20 | ||
21 | $obj = new Type_Default($CONFIG, $_GET); | 21 | $obj = new Type_Default($CONFIG, $_GET); |
22 | $obj->ds_names = array( | 22 | $obj->legend = array( |
23 | 'value' => 'Value', | 23 | 'value' => 'Value', |
24 | ); | 24 | ); |
25 | switch($obj->args['type']) { | 25 | switch($obj->args['type']) { |
diff --git a/plugin/libvirt.php b/plugin/libvirt.php index 0d7fff0..bcaeeb9 100644 --- a/plugin/libvirt.php +++ b/plugin/libvirt.php | |||
@@ -20,7 +20,7 @@ $obj = new Type_GenericIO($CONFIG, $_GET); | |||
20 | switch($obj->args['type']) { | 20 | switch($obj->args['type']) { |
21 | case 'disk_octets': | 21 | case 'disk_octets': |
22 | $obj->data_sources = array('read', 'write'); | 22 | $obj->data_sources = array('read', 'write'); |
23 | $obj->ds_names = array( | 23 | $obj->legend = array( |
24 | 'read' => 'Read', | 24 | 'read' => 'Read', |
25 | 'write' => 'Written', | 25 | 'write' => 'Written', |
26 | ); | 26 | ); |
@@ -34,7 +34,7 @@ switch($obj->args['type']) { | |||
34 | break; | 34 | break; |
35 | case 'disk_ops': | 35 | case 'disk_ops': |
36 | $obj->data_sources = array('read', 'write'); | 36 | $obj->data_sources = array('read', 'write'); |
37 | $obj->ds_names = array( | 37 | $obj->legend = array( |
38 | 'read' => 'Read', | 38 | 'read' => 'Read', |
39 | 'write' => 'Written', | 39 | 'write' => 'Written', |
40 | ); | 40 | ); |
@@ -48,7 +48,7 @@ switch($obj->args['type']) { | |||
48 | break; | 48 | break; |
49 | case 'if_dropped': | 49 | case 'if_dropped': |
50 | $obj->data_sources = array('rx', 'tx'); | 50 | $obj->data_sources = array('rx', 'tx'); |
51 | $obj->ds_names = array( | 51 | $obj->legend = array( |
52 | 'rx' => 'Receive', | 52 | 'rx' => 'Receive', |
53 | 'tx' => 'Transmit', | 53 | 'tx' => 'Transmit', |
54 | ); | 54 | ); |
@@ -61,7 +61,7 @@ switch($obj->args['type']) { | |||
61 | break; | 61 | break; |
62 | case 'if_errors': | 62 | case 'if_errors': |
63 | $obj->data_sources = array('rx', 'tx'); | 63 | $obj->data_sources = array('rx', 'tx'); |
64 | $obj->ds_names = array( | 64 | $obj->legend = array( |
65 | 'rx' => 'Receive', | 65 | 'rx' => 'Receive', |
66 | 'tx' => 'Transmit', | 66 | 'tx' => 'Transmit', |
67 | ); | 67 | ); |
@@ -74,7 +74,7 @@ switch($obj->args['type']) { | |||
74 | break; | 74 | break; |
75 | case 'if_octets': | 75 | case 'if_octets': |
76 | $obj->data_sources = array('rx', 'tx'); | 76 | $obj->data_sources = array('rx', 'tx'); |
77 | $obj->ds_names = array( | 77 | $obj->legend = array( |
78 | 'rx' => 'Receive', | 78 | 'rx' => 'Receive', |
79 | 'tx' => 'Transmit', | 79 | 'tx' => 'Transmit', |
80 | ); | 80 | ); |
@@ -88,7 +88,7 @@ switch($obj->args['type']) { | |||
88 | break; | 88 | break; |
89 | case 'if_packets': | 89 | case 'if_packets': |
90 | $obj->data_sources = array('rx', 'tx'); | 90 | $obj->data_sources = array('rx', 'tx'); |
91 | $obj->ds_names = array( | 91 | $obj->legend = array( |
92 | 'rx' => 'Receive', | 92 | 'rx' => 'Receive', |
93 | 'tx' => 'Transmit', | 93 | 'tx' => 'Transmit', |
94 | ); | 94 | ); |
@@ -104,7 +104,7 @@ switch($obj->args['type']) { | |||
104 | $obj = new Type_Default($CONFIG, $_GET); | 104 | $obj = new Type_Default($CONFIG, $_GET); |
105 | 105 | ||
106 | $obj->data_sources = array('value'); | 106 | $obj->data_sources = array('value'); |
107 | $obj->ds_names = array( | 107 | $obj->legend = array( |
108 | 'value' => 'CPU time', | 108 | 'value' => 'CPU time', |
109 | ); | 109 | ); |
110 | $obj->colors = array( | 110 | $obj->colors = array( |
@@ -118,7 +118,7 @@ switch($obj->args['type']) { | |||
118 | $obj = new Type_Default($CONFIG, $_GET); | 118 | $obj = new Type_Default($CONFIG, $_GET); |
119 | 119 | ||
120 | $obj->data_sources = array('value'); | 120 | $obj->data_sources = array('value'); |
121 | $obj->ds_names = array( | 121 | $obj->legend = array( |
122 | 'value' => 'VCPU time', | 122 | 'value' => 'VCPU time', |
123 | ); | 123 | ); |
124 | $obj->colors = array( | 124 | $obj->colors = array( |
@@ -134,8 +134,8 @@ $obj->rrd_format = '%5.1lf%s'; | |||
134 | if ($CONFIG['version'] < 5 && count($obj->data_sources) == 1) { | 134 | if ($CONFIG['version'] < 5 && count($obj->data_sources) == 1) { |
135 | $obj->data_sources = array('ns'); | 135 | $obj->data_sources = array('ns'); |
136 | 136 | ||
137 | $obj->ds_names['ns'] = $obj->ds_names['value']; | 137 | $obj->legend['ns'] = $obj->legend['value']; |
138 | unset($obj->ds_names['value']); | 138 | unset($obj->legend['value']); |
139 | 139 | ||
140 | $obj->colors['ns'] = $obj->colors['value']; | 140 | $obj->colors['ns'] = $obj->colors['value']; |
141 | unset($obj->colors['value']); | 141 | unset($obj->colors['value']); |
diff --git a/plugin/load.php b/plugin/load.php index a6e3355..78520c5 100644 --- a/plugin/load.php +++ b/plugin/load.php | |||
@@ -10,7 +10,7 @@ require_once 'type/Default.class.php'; | |||
10 | 10 | ||
11 | $obj = new Type_Default($CONFIG, $_GET); | 11 | $obj = new Type_Default($CONFIG, $_GET); |
12 | $obj->data_sources = array('shortterm', 'midterm', 'longterm'); | 12 | $obj->data_sources = array('shortterm', 'midterm', 'longterm'); |
13 | $obj->ds_names = array( | 13 | $obj->legend = array( |
14 | 'shortterm' => ' 1 min', | 14 | 'shortterm' => ' 1 min', |
15 | 'midterm' => ' 5 min', | 15 | 'midterm' => ' 5 min', |
16 | 'longterm' => '15 min', | 16 | 'longterm' => '15 min', |
diff --git a/plugin/md.php b/plugin/md.php index 03f529a..9d09efe 100644 --- a/plugin/md.php +++ b/plugin/md.php | |||
@@ -10,7 +10,7 @@ require_once 'type/Default.class.php'; | |||
10 | # md-XXXX/md_disks-XXXX.rrd | 10 | # md-XXXX/md_disks-XXXX.rrd |
11 | 11 | ||
12 | $obj = new Type_Default($CONFIG, $_GET); | 12 | $obj = new Type_Default($CONFIG, $_GET); |
13 | $obj->ds_names = array( | 13 | $obj->legend = array( |
14 | 'value' => 'Value', | 14 | 'value' => 'Value', |
15 | ); | 15 | ); |
16 | $obj->rrd_title = sprintf('Disks (md-%s)', $obj->args['pinstance']); | 16 | $obj->rrd_title = sprintf('Disks (md-%s)', $obj->args['pinstance']); |
diff --git a/plugin/memcached.php b/plugin/memcached.php index 09715ae..62eebfd 100644 --- a/plugin/memcached.php +++ b/plugin/memcached.php | |||
@@ -27,7 +27,7 @@ switch(GET('t')) { | |||
27 | $obj = new Type_Default($CONFIG, $_GET); | 27 | $obj = new Type_Default($CONFIG, $_GET); |
28 | $obj->data_sources = array('used', 'free'); | 28 | $obj->data_sources = array('used', 'free'); |
29 | $obj->order = array('used', 'free'); | 29 | $obj->order = array('used', 'free'); |
30 | $obj->ds_names = array( | 30 | $obj->legend = array( |
31 | 'used' => 'Used', | 31 | 'used' => 'Used', |
32 | 'free' => 'Free', | 32 | 'free' => 'Free', |
33 | ); | 33 | ); |
@@ -44,7 +44,7 @@ switch(GET('t')) { | |||
44 | require_once 'type/GenericStacked.class.php'; | 44 | require_once 'type/GenericStacked.class.php'; |
45 | $obj = new Type_GenericStacked($CONFIG, $_GET); | 45 | $obj = new Type_GenericStacked($CONFIG, $_GET); |
46 | $obj->order = array('flush', 'get', 'set'); | 46 | $obj->order = array('flush', 'get', 'set'); |
47 | $obj->ds_names = array( | 47 | $obj->legend = array( |
48 | 'flush' => 'Flush', | 48 | 'flush' => 'Flush', |
49 | 'get' => 'Get', | 49 | 'get' => 'Get', |
50 | 'set' => 'Set', | 50 | 'set' => 'Set', |
@@ -63,7 +63,7 @@ switch(GET('t')) { | |||
63 | require_once 'type/Default.class.php'; | 63 | require_once 'type/Default.class.php'; |
64 | $obj = new Type_Default($CONFIG, $_GET); | 64 | $obj = new Type_Default($CONFIG, $_GET); |
65 | $obj->data_sources = array('value'); | 65 | $obj->data_sources = array('value'); |
66 | $obj->ds_names = array( | 66 | $obj->legend = array( |
67 | 'value' => 'Connections', | 67 | 'value' => 'Connections', |
68 | ); | 68 | ); |
69 | $obj->colors = array( | 69 | $obj->colors = array( |
@@ -78,7 +78,7 @@ switch(GET('t')) { | |||
78 | require_once 'type/Default.class.php'; | 78 | require_once 'type/Default.class.php'; |
79 | $obj = new Type_Default($CONFIG, $_GET); | 79 | $obj = new Type_Default($CONFIG, $_GET); |
80 | $obj->data_sources = array('value'); | 80 | $obj->data_sources = array('value'); |
81 | $obj->ds_names = array( | 81 | $obj->legend = array( |
82 | 'value ' => 'Items', | 82 | 'value ' => 'Items', |
83 | ); | 83 | ); |
84 | $obj->colors = array( | 84 | $obj->colors = array( |
@@ -94,7 +94,7 @@ switch(GET('t')) { | |||
94 | $obj = new Type_Default($CONFIG, $_GET); | 94 | $obj = new Type_Default($CONFIG, $_GET); |
95 | $obj->data_sources = array('rx', 'tx'); | 95 | $obj->data_sources = array('rx', 'tx'); |
96 | $obj->order = array('rx', 'tx'); | 96 | $obj->order = array('rx', 'tx'); |
97 | $obj->ds_names = array( | 97 | $obj->legend = array( |
98 | 'rx' => 'Receive', | 98 | 'rx' => 'Receive', |
99 | 'tx' => 'Transmit', | 99 | 'tx' => 'Transmit', |
100 | ); | 100 | ); |
@@ -111,7 +111,7 @@ switch(GET('t')) { | |||
111 | require_once 'type/GenericStacked.class.php'; | 111 | require_once 'type/GenericStacked.class.php'; |
112 | $obj = new Type_GenericStacked($CONFIG, $_GET); | 112 | $obj = new Type_GenericStacked($CONFIG, $_GET); |
113 | $obj->order = array('evictions', 'hits', 'misses'); | 113 | $obj->order = array('evictions', 'hits', 'misses'); |
114 | $obj->ds_names = array( | 114 | $obj->legend = array( |
115 | 'evictions' => 'Evictions', | 115 | 'evictions' => 'Evictions', |
116 | 'hits' => 'Hits', | 116 | 'hits' => 'Hits', |
117 | 'misses' => 'Misses', | 117 | 'misses' => 'Misses', |
@@ -130,7 +130,7 @@ switch(GET('t')) { | |||
130 | require_once 'type/Default.class.php'; | 130 | require_once 'type/Default.class.php'; |
131 | $obj = new Type_Default($CONFIG, $_GET); | 131 | $obj = new Type_Default($CONFIG, $_GET); |
132 | $obj->data_sources = array('percent'); | 132 | $obj->data_sources = array('percent'); |
133 | $obj->ds_names = array( | 133 | $obj->legend = array( |
134 | 'percent ' => 'Percentage', | 134 | 'percent ' => 'Percentage', |
135 | ); | 135 | ); |
136 | $obj->colors = array( | 136 | $obj->colors = array( |
@@ -145,7 +145,7 @@ switch(GET('t')) { | |||
145 | $obj = new Type_Default($CONFIG, $_GET); | 145 | $obj = new Type_Default($CONFIG, $_GET); |
146 | $obj->data_sources = array('threads'); | 146 | $obj->data_sources = array('threads'); |
147 | $obj->order = array('threads'); | 147 | $obj->order = array('threads'); |
148 | $obj->ds_names = array( | 148 | $obj->legend = array( |
149 | 'threads' => 'Threads', | 149 | 'threads' => 'Threads', |
150 | ); | 150 | ); |
151 | $obj->colors = array( | 151 | $obj->colors = array( |
@@ -161,7 +161,7 @@ switch(GET('t')) { | |||
161 | $obj = new Type_Default($CONFIG, $_GET); | 161 | $obj = new Type_Default($CONFIG, $_GET); |
162 | $obj->data_sources = array('user', 'syst'); | 162 | $obj->data_sources = array('user', 'syst'); |
163 | $obj->order = array('user', 'syst'); | 163 | $obj->order = array('user', 'syst'); |
164 | $obj->ds_names = array( | 164 | $obj->legend = array( |
165 | 'user' => 'User', | 165 | 'user' => 'User', |
166 | 'syst' => 'System', | 166 | 'syst' => 'System', |
167 | ); | 167 | ); |
diff --git a/plugin/memory.php b/plugin/memory.php index 9fd2e30..0a1fe68 100644 --- a/plugin/memory.php +++ b/plugin/memory.php | |||
@@ -14,7 +14,7 @@ require_once 'type/GenericStacked.class.php'; | |||
14 | 14 | ||
15 | $obj = new Type_GenericStacked($CONFIG, $_GET); | 15 | $obj = new Type_GenericStacked($CONFIG, $_GET); |
16 | $obj->order = array('free', 'inactive', 'buffered', 'cached', 'cache', 'locked', 'used', 'active', 'wired'); | 16 | $obj->order = array('free', 'inactive', 'buffered', 'cached', 'cache', 'locked', 'used', 'active', 'wired'); |
17 | $obj->ds_names = array( | 17 | $obj->legend = array( |
18 | 'free' => 'Free', | 18 | 'free' => 'Free', |
19 | 'inactive' => 'Inactive', | 19 | 'inactive' => 'Inactive', |
20 | 'cached' => 'Cached', | 20 | 'cached' => 'Cached', |
diff --git a/plugin/mysql.php b/plugin/mysql.php index aad0131..880b8c0 100644 --- a/plugin/mysql.php +++ b/plugin/mysql.php | |||
@@ -11,7 +11,7 @@ $obj->rrd_format = '%5.1lf%s'; | |||
11 | switch($obj->args['type']) | 11 | switch($obj->args['type']) |
12 | { | 12 | { |
13 | case 'cache_result': | 13 | case 'cache_result': |
14 | $obj->ds_names = array( | 14 | $obj->legend = array( |
15 | 'qcache-not_cached' => 'Not Cached', | 15 | 'qcache-not_cached' => 'Not Cached', |
16 | 'qcache-inserts' => 'Inserts', | 16 | 'qcache-inserts' => 'Inserts', |
17 | 'qcache-hits' => 'Hits', | 17 | 'qcache-hits' => 'Hits', |
@@ -27,7 +27,7 @@ switch($obj->args['type']) | |||
27 | $obj->rrd_vertical = 'Queries/s'; | 27 | $obj->rrd_vertical = 'Queries/s'; |
28 | break; | 28 | break; |
29 | case 'cache_size': | 29 | case 'cache_size': |
30 | $obj->ds_names = array( | 30 | $obj->legend = array( |
31 | 'qcache' => 'Queries', | 31 | 'qcache' => 'Queries', |
32 | ); | 32 | ); |
33 | $obj->rrd_title = sprintf('MySQL query cache size (%s)', $obj->args['pinstance']); | 33 | $obj->rrd_title = sprintf('MySQL query cache size (%s)', $obj->args['pinstance']); |
@@ -65,7 +65,7 @@ switch($obj->args['type']) | |||
65 | break; | 65 | break; |
66 | case 'mysql_octets': | 66 | case 'mysql_octets': |
67 | $obj->data_sources = array('rx', 'tx'); | 67 | $obj->data_sources = array('rx', 'tx'); |
68 | $obj->ds_names = array( | 68 | $obj->legend = array( |
69 | 'rx' => 'Receive', | 69 | 'rx' => 'Receive', |
70 | 'tx' => 'Transmit', | 70 | 'tx' => 'Transmit', |
71 | ); | 71 | ); |
@@ -77,7 +77,7 @@ switch($obj->args['type']) | |||
77 | $obj->rrd_vertical = 'Bits per second'; | 77 | $obj->rrd_vertical = 'Bits per second'; |
78 | break; | 78 | break; |
79 | case 'threads': | 79 | case 'threads': |
80 | $obj->ds_names = array( | 80 | $obj->legend = array( |
81 | 'cached' => 'Cached', | 81 | 'cached' => 'Cached', |
82 | 'connected' => 'Connected', | 82 | 'connected' => 'Connected', |
83 | 'running' => 'Running', | 83 | 'running' => 'Running', |
@@ -91,7 +91,7 @@ switch($obj->args['type']) | |||
91 | $obj->rrd_vertical = 'Threads'; | 91 | $obj->rrd_vertical = 'Threads'; |
92 | break; | 92 | break; |
93 | case 'total_threads': | 93 | case 'total_threads': |
94 | $obj->ds_names = array( | 94 | $obj->legend = array( |
95 | 'created' => 'Created', | 95 | 'created' => 'Created', |
96 | ); | 96 | ); |
97 | $obj->rrd_title = sprintf('MySQL created threads (%s)', $obj->args['pinstance']); | 97 | $obj->rrd_title = sprintf('MySQL created threads (%s)', $obj->args['pinstance']); |
@@ -100,7 +100,7 @@ switch($obj->args['type']) | |||
100 | # mysql_qcache is removed since commit collectd-4.10.0-104-g9ae3541 | 100 | # mysql_qcache is removed since commit collectd-4.10.0-104-g9ae3541 |
101 | case 'mysql_qcache': | 101 | case 'mysql_qcache': |
102 | $obj->data_sources = array('not_cached', 'inserts', 'hits', 'lowmem_prunes', 'queries_in_cache'); | 102 | $obj->data_sources = array('not_cached', 'inserts', 'hits', 'lowmem_prunes', 'queries_in_cache'); |
103 | $obj->ds_names = array( | 103 | $obj->legend = array( |
104 | 'not_cached' => 'Not Cached', | 104 | 'not_cached' => 'Not Cached', |
105 | 'inserts' => 'Inserts', | 105 | 'inserts' => 'Inserts', |
106 | 'hits' => 'Hits', | 106 | 'hits' => 'Hits', |
@@ -120,7 +120,7 @@ switch($obj->args['type']) | |||
120 | # mysql_threads is removed since commit collectd-4.10.0-105-g6c48fca | 120 | # mysql_threads is removed since commit collectd-4.10.0-105-g6c48fca |
121 | case 'mysql_threads': | 121 | case 'mysql_threads': |
122 | $obj->data_sources = array('cached', 'connected', 'running', 'created'); | 122 | $obj->data_sources = array('cached', 'connected', 'running', 'created'); |
123 | $obj->ds_names = array( | 123 | $obj->legend = array( |
124 | 'cached' => 'Cached', | 124 | 'cached' => 'Cached', |
125 | 'connected' => 'Connected', | 125 | 'connected' => 'Connected', |
126 | 'running' => 'Running', | 126 | 'running' => 'Running', |
diff --git a/plugin/netlink.php b/plugin/netlink.php index 28a25f1..9ddaee8 100644 --- a/plugin/netlink.php +++ b/plugin/netlink.php | |||
@@ -12,14 +12,14 @@ $obj->rrd_format = '%5.1lf%s'; | |||
12 | switch($obj->args['type']) { | 12 | switch($obj->args['type']) { |
13 | case 'if_collisions': | 13 | case 'if_collisions': |
14 | $obj->data_sources = array('value'); | 14 | $obj->data_sources = array('value'); |
15 | $obj->ds_names = array('value' => 'Collisions'); | 15 | $obj->legend = array('value' => 'Collisions'); |
16 | $obj->colors = array('value' => '0000ff'); | 16 | $obj->colors = array('value' => '0000ff'); |
17 | $obj->rrd_title = sprintf('Collisions (%s)', $obj->args['pinstance']); | 17 | $obj->rrd_title = sprintf('Collisions (%s)', $obj->args['pinstance']); |
18 | $obj->rrd_vertical = 'Collisions/s'; | 18 | $obj->rrd_vertical = 'Collisions/s'; |
19 | break; | 19 | break; |
20 | case 'if_dropped': | 20 | case 'if_dropped': |
21 | $obj->data_sources = array('rx', 'tx'); | 21 | $obj->data_sources = array('rx', 'tx'); |
22 | $obj->ds_names = array( | 22 | $obj->legend = array( |
23 | 'rx' => 'Receive', | 23 | 'rx' => 'Receive', |
24 | 'tx' => 'Transmit', | 24 | 'tx' => 'Transmit', |
25 | ); | 25 | ); |
@@ -32,7 +32,7 @@ switch($obj->args['type']) { | |||
32 | break; | 32 | break; |
33 | case 'if_errors': | 33 | case 'if_errors': |
34 | $obj->data_sources = array('rx', 'tx'); | 34 | $obj->data_sources = array('rx', 'tx'); |
35 | $obj->ds_names = array( | 35 | $obj->legend = array( |
36 | 'rx' => 'Receive', | 36 | 'rx' => 'Receive', |
37 | 'tx' => 'Transmit', | 37 | 'tx' => 'Transmit', |
38 | ); | 38 | ); |
@@ -45,14 +45,14 @@ switch($obj->args['type']) { | |||
45 | break; | 45 | break; |
46 | case 'if_multicast': | 46 | case 'if_multicast': |
47 | $obj->data_sources = array('value'); | 47 | $obj->data_sources = array('value'); |
48 | $obj->ds_names = array('value' => 'Packets'); | 48 | $obj->legend = array('value' => 'Packets'); |
49 | $obj->colors = array('value' => '0000ff'); | 49 | $obj->colors = array('value' => '0000ff'); |
50 | $obj->rrd_title = sprintf('Multicast Packets (%s)', $obj->args['pinstance']); | 50 | $obj->rrd_title = sprintf('Multicast Packets (%s)', $obj->args['pinstance']); |
51 | $obj->rrd_vertical = 'Packets/s'; | 51 | $obj->rrd_vertical = 'Packets/s'; |
52 | break; | 52 | break; |
53 | case 'if_octets': | 53 | case 'if_octets': |
54 | $obj->data_sources = array('rx', 'tx'); | 54 | $obj->data_sources = array('rx', 'tx'); |
55 | $obj->ds_names = array( | 55 | $obj->legend = array( |
56 | 'rx' => 'Receive', | 56 | 'rx' => 'Receive', |
57 | 'tx' => 'Transmit', | 57 | 'tx' => 'Transmit', |
58 | ); | 58 | ); |
@@ -66,7 +66,7 @@ switch($obj->args['type']) { | |||
66 | break; | 66 | break; |
67 | case 'if_packets': | 67 | case 'if_packets': |
68 | $obj->data_sources = array('rx', 'tx'); | 68 | $obj->data_sources = array('rx', 'tx'); |
69 | $obj->ds_names = array( | 69 | $obj->legend = array( |
70 | 'rx' => 'Receive', | 70 | 'rx' => 'Receive', |
71 | 'tx' => 'Transmit', | 71 | 'tx' => 'Transmit', |
72 | ); | 72 | ); |
@@ -79,7 +79,7 @@ switch($obj->args['type']) { | |||
79 | break; | 79 | break; |
80 | case 'if_rx_errors': | 80 | case 'if_rx_errors': |
81 | $obj->data_sources = array('value'); | 81 | $obj->data_sources = array('value'); |
82 | $obj->ds_names = array( | 82 | $obj->legend = array( |
83 | 'crc' => 'CRC', | 83 | 'crc' => 'CRC', |
84 | 'fifo' => 'FiFo', | 84 | 'fifo' => 'FiFo', |
85 | 'frame' => 'Frame', | 85 | 'frame' => 'Frame', |
@@ -100,7 +100,7 @@ switch($obj->args['type']) { | |||
100 | break; | 100 | break; |
101 | case 'if_tx_errors': | 101 | case 'if_tx_errors': |
102 | $obj->data_sources = array('value'); | 102 | $obj->data_sources = array('value'); |
103 | $obj->ds_names = array( | 103 | $obj->legend = array( |
104 | 'aborted' => 'Aborted', | 104 | 'aborted' => 'Aborted', |
105 | 'carrier' => 'Carrier', | 105 | 'carrier' => 'Carrier', |
106 | 'fifo' => 'FiFo', | 106 | 'fifo' => 'FiFo', |
diff --git a/plugin/nginx.php b/plugin/nginx.php index 7d70190..cbb0fa4 100644 --- a/plugin/nginx.php +++ b/plugin/nginx.php | |||
@@ -21,7 +21,7 @@ switch($obj->args['type']) | |||
21 | { | 21 | { |
22 | case 'connections': | 22 | case 'connections': |
23 | $obj->order = array('accepted', 'handled'); | 23 | $obj->order = array('accepted', 'handled'); |
24 | $obj->ds_names = array( | 24 | $obj->legend = array( |
25 | 'accepted' => 'Accepted', | 25 | 'accepted' => 'Accepted', |
26 | 'handled' => 'Handled', | 26 | 'handled' => 'Handled', |
27 | ); | 27 | ); |
@@ -34,7 +34,7 @@ switch($obj->args['type']) | |||
34 | break; | 34 | break; |
35 | case 'nginx_connections': | 35 | case 'nginx_connections': |
36 | $obj->order = array('active', 'reading', 'waiting', 'writing'); | 36 | $obj->order = array('active', 'reading', 'waiting', 'writing'); |
37 | $obj->ds_names = array( | 37 | $obj->legend = array( |
38 | 'active' => 'Active', | 38 | 'active' => 'Active', |
39 | 'reading' => 'Reading', | 39 | 'reading' => 'Reading', |
40 | 'waiting' => 'Waiting', | 40 | 'waiting' => 'Waiting', |
@@ -50,7 +50,7 @@ switch($obj->args['type']) | |||
50 | $obj->rrd_vertical = 'Connections/s'; | 50 | $obj->rrd_vertical = 'Connections/s'; |
51 | break; | 51 | break; |
52 | case 'nginx_requests': | 52 | case 'nginx_requests': |
53 | $obj->ds_names = array( | 53 | $obj->legend = array( |
54 | 'value' => 'Requests', | 54 | 'value' => 'Requests', |
55 | ); | 55 | ); |
56 | $obj->colors = array( | 56 | $obj->colors = array( |
diff --git a/plugin/ntpd.php b/plugin/ntpd.php index 22f9580..ceea1db 100644 --- a/plugin/ntpd.php +++ b/plugin/ntpd.php | |||
@@ -13,7 +13,7 @@ require_once 'type/Default.class.php'; | |||
13 | # ntpd/time_offset-<host>.rrd | 13 | # ntpd/time_offset-<host>.rrd |
14 | 14 | ||
15 | $obj = new Type_Default($CONFIG, $_GET); | 15 | $obj = new Type_Default($CONFIG, $_GET); |
16 | $obj->ds_names = array('ping' => 'Ping time', | 16 | $obj->legend = array('ping' => 'Ping time', |
17 | 'ping_stddev' => 'Ping stddev', | 17 | 'ping_stddev' => 'Ping stddev', |
18 | 'ping_droprate' => 'Ping droprate'); | 18 | 'ping_droprate' => 'Ping droprate'); |
19 | $obj->rrd_format = '%5.1lf%s'; | 19 | $obj->rrd_format = '%5.1lf%s'; |
diff --git a/plugin/nut.php b/plugin/nut.php index f8d7150..eb2ceb2 100644 --- a/plugin/nut.php +++ b/plugin/nut.php | |||
@@ -21,7 +21,7 @@ switch($obj->args['type']) { | |||
21 | } else { | 21 | } else { |
22 | $obj->data_sources = array('value'); | 22 | $obj->data_sources = array('value'); |
23 | } | 23 | } |
24 | $obj->ds_names = array('output' => 'Output'); | 24 | $obj->legend = array('output' => 'Output'); |
25 | $obj->rrd_title = sprintf('Frequency (%s)', $obj->args['pinstance']); | 25 | $obj->rrd_title = sprintf('Frequency (%s)', $obj->args['pinstance']); |
26 | $obj->rrd_vertical = 'Hz'; | 26 | $obj->rrd_vertical = 'Hz'; |
27 | $obj->rrd_format = '%5.1lf%s'; | 27 | $obj->rrd_format = '%5.1lf%s'; |
@@ -32,7 +32,7 @@ switch($obj->args['type']) { | |||
32 | } else { | 32 | } else { |
33 | $obj->data_sources = array('value'); | 33 | $obj->data_sources = array('value'); |
34 | } | 34 | } |
35 | $obj->ds_names = array('charge' => 'Charge', | 35 | $obj->legend = array('charge' => 'Charge', |
36 | 'load' => 'Load'); | 36 | 'load' => 'Load'); |
37 | $obj->rrd_title = sprintf('Charge & load (%s)', $obj->args['pinstance']); | 37 | $obj->rrd_title = sprintf('Charge & load (%s)', $obj->args['pinstance']); |
38 | $obj->rrd_vertical = '%'; | 38 | $obj->rrd_vertical = '%'; |
@@ -40,14 +40,14 @@ switch($obj->args['type']) { | |||
40 | break; | 40 | break; |
41 | case 'power': | 41 | case 'power': |
42 | $obj->data_sources = array('value'); | 42 | $obj->data_sources = array('value'); |
43 | $obj->ds_names = array('ups' => 'UPS'); | 43 | $obj->legend = array('ups' => 'UPS'); |
44 | $obj->rrd_title = sprintf('Power (%s)', $obj->args['pinstance']); | 44 | $obj->rrd_title = sprintf('Power (%s)', $obj->args['pinstance']); |
45 | $obj->rrd_vertical = 'VA'; | 45 | $obj->rrd_vertical = 'VA'; |
46 | $obj->rrd_format = '%5.1lf%s'; | 46 | $obj->rrd_format = '%5.1lf%s'; |
47 | break; | 47 | break; |
48 | case 'temperature': | 48 | case 'temperature': |
49 | $obj->data_sources = array('value'); | 49 | $obj->data_sources = array('value'); |
50 | $obj->ds_names = array('battery' => 'Battery'); | 50 | $obj->legend = array('battery' => 'Battery'); |
51 | $obj->rrd_title = sprintf('Temperature (%s)', $obj->args['pinstance']); | 51 | $obj->rrd_title = sprintf('Temperature (%s)', $obj->args['pinstance']); |
52 | $obj->rrd_vertical = '°C'; | 52 | $obj->rrd_vertical = '°C'; |
53 | $obj->rrd_format = '%5.1lf%s'; | 53 | $obj->rrd_format = '%5.1lf%s'; |
@@ -58,14 +58,14 @@ switch($obj->args['type']) { | |||
58 | } else { | 58 | } else { |
59 | $obj->data_sources = array('value'); | 59 | $obj->data_sources = array('value'); |
60 | } | 60 | } |
61 | $obj->ds_names = array('timeleft' => 'Timeleft'); | 61 | $obj->legend = array('timeleft' => 'Timeleft'); |
62 | $obj->rrd_title = sprintf('Timeleft (%s)', $obj->args['pinstance']); | 62 | $obj->rrd_title = sprintf('Timeleft (%s)', $obj->args['pinstance']); |
63 | $obj->rrd_vertical = 'Seconds'; | 63 | $obj->rrd_vertical = 'Seconds'; |
64 | $obj->rrd_format = '%5.1lf'; | 64 | $obj->rrd_format = '%5.1lf'; |
65 | break; | 65 | break; |
66 | case 'voltage': | 66 | case 'voltage': |
67 | $obj->data_sources = array('value'); | 67 | $obj->data_sources = array('value'); |
68 | $obj->ds_names = array('battery' => 'Battery', | 68 | $obj->legend = array('battery' => 'Battery', |
69 | 'input' => 'Input', | 69 | 'input' => 'Input', |
70 | 'output' => 'Output'); | 70 | 'output' => 'Output'); |
71 | $obj->rrd_title = sprintf('Voltage (%s)', $obj->args['pinstance']); | 71 | $obj->rrd_title = sprintf('Voltage (%s)', $obj->args['pinstance']); |
diff --git a/plugin/openvpn.php b/plugin/openvpn.php index 1ff6dd1..6eba3d5 100644 --- a/plugin/openvpn.php +++ b/plugin/openvpn.php | |||
@@ -14,7 +14,7 @@ switch(GET('t')) { | |||
14 | require_once 'type/GenericIO.class.php'; | 14 | require_once 'type/GenericIO.class.php'; |
15 | $obj = new Type_GenericIO($CONFIG, $_GET); | 15 | $obj = new Type_GenericIO($CONFIG, $_GET); |
16 | $obj->data_sources = array('rx', 'tx'); | 16 | $obj->data_sources = array('rx', 'tx'); |
17 | $obj->ds_names = array( | 17 | $obj->legend = array( |
18 | 'rx' => 'Receive', | 18 | 'rx' => 'Receive', |
19 | 'tx' => 'Transmit', | 19 | 'tx' => 'Transmit', |
20 | ); | 20 | ); |
@@ -30,7 +30,7 @@ switch(GET('t')) { | |||
30 | case 'users': | 30 | case 'users': |
31 | require_once 'type/Default.class.php'; | 31 | require_once 'type/Default.class.php'; |
32 | $obj = new Type_Default($CONFIG, $_GET); | 32 | $obj = new Type_Default($CONFIG, $_GET); |
33 | $obj->ds_names = array( | 33 | $obj->legend = array( |
34 | 'value' => 'Users', | 34 | 'value' => 'Users', |
35 | ); | 35 | ); |
36 | $obj->rrd_title = sprintf('Users (%s)', $obj->args['pinstance']); | 36 | $obj->rrd_title = sprintf('Users (%s)', $obj->args['pinstance']); |
diff --git a/plugin/ping.php b/plugin/ping.php index 845a6d9..ca2920c 100644 --- a/plugin/ping.php +++ b/plugin/ping.php | |||
@@ -13,7 +13,7 @@ require_once 'type/Default.class.php'; | |||
13 | 13 | ||
14 | $obj = new Type_Default($CONFIG, $_GET); | 14 | $obj = new Type_Default($CONFIG, $_GET); |
15 | $obj->data_sources = array('value'); | 15 | $obj->data_sources = array('value'); |
16 | $obj->ds_names = array('ping' => 'Ping time', | 16 | $obj->legend = array('ping' => 'Ping time', |
17 | 'ping_stddev' => 'Ping stddev', | 17 | 'ping_stddev' => 'Ping stddev', |
18 | 'ping_droprate' => 'Ping droprate'); | 18 | 'ping_droprate' => 'Ping droprate'); |
19 | $obj->rrd_format = '%5.1lf'; | 19 | $obj->rrd_format = '%5.1lf'; |
diff --git a/plugin/postgresql.php b/plugin/postgresql.php index 4c2a62f..4cfae41 100644 --- a/plugin/postgresql.php +++ b/plugin/postgresql.php | |||
@@ -25,7 +25,7 @@ $obj->rrd_format = '%5.1lf%s'; | |||
25 | 25 | ||
26 | switch($obj->args['type']) { | 26 | switch($obj->args['type']) { |
27 | case 'pg_blks': | 27 | case 'pg_blks': |
28 | $obj->ds_names = array( | 28 | $obj->legend = array( |
29 | 'heap_hit' => 'Heap hit', | 29 | 'heap_hit' => 'Heap hit', |
30 | 'heap_read' => 'Heap read', | 30 | 'heap_read' => 'Heap read', |
31 | 'idx_hit' => 'Index hit', | 31 | 'idx_hit' => 'Index hit', |
@@ -40,7 +40,7 @@ switch($obj->args['type']) { | |||
40 | $obj->rrd_vertical = 'Blocks'; | 40 | $obj->rrd_vertical = 'Blocks'; |
41 | break; | 41 | break; |
42 | case 'pg_db_size': | 42 | case 'pg_db_size': |
43 | $obj->ds_names = array( | 43 | $obj->legend = array( |
44 | 'value' => 'Size', | 44 | 'value' => 'Size', |
45 | ); | 45 | ); |
46 | $obj->colors = array( | 46 | $obj->colors = array( |
@@ -57,7 +57,7 @@ switch($obj->args['type']) { | |||
57 | 'hot_upd', | 57 | 'hot_upd', |
58 | 'del', | 58 | 'del', |
59 | ); | 59 | ); |
60 | $obj->ds_names = array( | 60 | $obj->legend = array( |
61 | 'ins' => 'Insert', | 61 | 'ins' => 'Insert', |
62 | 'upd' => 'Update', | 62 | 'upd' => 'Update', |
63 | 'hot_upd' => 'Hot Update', | 63 | 'hot_upd' => 'Hot Update', |
@@ -75,7 +75,7 @@ switch($obj->args['type']) { | |||
75 | break; | 75 | break; |
76 | case 'pg_n_tup_g': | 76 | case 'pg_n_tup_g': |
77 | $obj->order = array('live', 'dead'); | 77 | $obj->order = array('live', 'dead'); |
78 | $obj->ds_names = array( | 78 | $obj->legend = array( |
79 | 'live' => 'Live', | 79 | 'live' => 'Live', |
80 | 'dead' => 'Dead', | 80 | 'dead' => 'Dead', |
81 | ); | 81 | ); |
@@ -88,7 +88,7 @@ switch($obj->args['type']) { | |||
88 | $obj->rrd_vertical = 'Rows'; | 88 | $obj->rrd_vertical = 'Rows'; |
89 | break; | 89 | break; |
90 | case 'pg_numbackends': | 90 | case 'pg_numbackends': |
91 | $obj->ds_names = array( | 91 | $obj->legend = array( |
92 | 'value' => 'Backends', | 92 | 'value' => 'Backends', |
93 | ); | 93 | ); |
94 | $obj->colors = array( | 94 | $obj->colors = array( |
@@ -99,7 +99,7 @@ switch($obj->args['type']) { | |||
99 | $obj->rrd_vertical = 'Number'; | 99 | $obj->rrd_vertical = 'Number'; |
100 | break; | 100 | break; |
101 | case 'pg_scan': | 101 | case 'pg_scan': |
102 | $obj->ds_names = array( | 102 | $obj->legend = array( |
103 | 'seq' => 'Sequential', | 103 | 'seq' => 'Sequential', |
104 | 'seq_tup_read' => 'Sequential rows', | 104 | 'seq_tup_read' => 'Sequential rows', |
105 | 'idx' => 'Index', | 105 | 'idx' => 'Index', |
@@ -110,7 +110,7 @@ switch($obj->args['type']) { | |||
110 | $obj->rrd_vertical = 'Scans / Rows'; | 110 | $obj->rrd_vertical = 'Scans / Rows'; |
111 | break; | 111 | break; |
112 | case 'pg_xact': | 112 | case 'pg_xact': |
113 | $obj->ds_names = array( | 113 | $obj->legend = array( |
114 | 'commit' => 'Commit', | 114 | 'commit' => 'Commit', |
115 | 'rollback' => 'Rollback', | 115 | 'rollback' => 'Rollback', |
116 | ); | 116 | ); |
diff --git a/plugin/processes.php b/plugin/processes.php index a35800b..27819cc 100644 --- a/plugin/processes.php +++ b/plugin/processes.php | |||
@@ -20,7 +20,7 @@ $obj->rrd_format = '%5.1lf%s'; | |||
20 | switch($obj->args['type']) | 20 | switch($obj->args['type']) |
21 | { | 21 | { |
22 | case 'ps_state': | 22 | case 'ps_state': |
23 | $obj->ds_names = array( | 23 | $obj->legend = array( |
24 | 'paging' => 'Paging', | 24 | 'paging' => 'Paging', |
25 | 'blocked' => 'Blocked', | 25 | 'blocked' => 'Blocked', |
26 | 'zombies' => 'Zombies', | 26 | 'zombies' => 'Zombies', |
@@ -42,7 +42,7 @@ switch($obj->args['type']) | |||
42 | break; | 42 | break; |
43 | 43 | ||
44 | case 'fork_rate': | 44 | case 'fork_rate': |
45 | $obj->ds_names = array( | 45 | $obj->legend = array( |
46 | 'value' => 'Forks', | 46 | 'value' => 'Forks', |
47 | ); | 47 | ); |
48 | $obj->colors = array( | 48 | $obj->colors = array( |
@@ -53,7 +53,7 @@ switch($obj->args['type']) | |||
53 | break; | 53 | break; |
54 | 54 | ||
55 | case 'ps_code': | 55 | case 'ps_code': |
56 | $obj->ds_names = array( | 56 | $obj->legend = array( |
57 | 'value' => 'TRS', | 57 | 'value' => 'TRS', |
58 | ); | 58 | ); |
59 | $obj->colors = array( | 59 | $obj->colors = array( |
@@ -65,7 +65,7 @@ switch($obj->args['type']) | |||
65 | 65 | ||
66 | case 'ps_count': | 66 | case 'ps_count': |
67 | $obj->data_sources = array('processes', 'threads'); | 67 | $obj->data_sources = array('processes', 'threads'); |
68 | $obj->ds_names = array( | 68 | $obj->legend = array( |
69 | 'processes' => 'Processes', | 69 | 'processes' => 'Processes', |
70 | 'threads' => 'Threads', | 70 | 'threads' => 'Threads', |
71 | ); | 71 | ); |
@@ -79,7 +79,7 @@ switch($obj->args['type']) | |||
79 | 79 | ||
80 | case 'ps_cputime': | 80 | case 'ps_cputime': |
81 | $obj->data_sources = array('user', 'syst'); | 81 | $obj->data_sources = array('user', 'syst'); |
82 | $obj->ds_names = array( | 82 | $obj->legend = array( |
83 | 'user' => 'User', | 83 | 'user' => 'User', |
84 | 'syst' => 'System', | 84 | 'syst' => 'System', |
85 | ); | 85 | ); |
@@ -93,7 +93,7 @@ switch($obj->args['type']) | |||
93 | 93 | ||
94 | case 'ps_disk_octets': | 94 | case 'ps_disk_octets': |
95 | $obj->data_sources = array('read', 'write'); | 95 | $obj->data_sources = array('read', 'write'); |
96 | $obj->ds_names = array( | 96 | $obj->legend = array( |
97 | 'read' => 'Read', | 97 | 'read' => 'Read', |
98 | 'write' => 'Write', | 98 | 'write' => 'Write', |
99 | ); | 99 | ); |
@@ -107,7 +107,7 @@ switch($obj->args['type']) | |||
107 | 107 | ||
108 | case 'ps_disk_ops': | 108 | case 'ps_disk_ops': |
109 | $obj->data_sources = array('read', 'write'); | 109 | $obj->data_sources = array('read', 'write'); |
110 | $obj->ds_names = array( | 110 | $obj->legend = array( |
111 | 'read' => 'Read', | 111 | 'read' => 'Read', |
112 | 'write' => 'Write', | 112 | 'write' => 'Write', |
113 | ); | 113 | ); |
@@ -120,7 +120,7 @@ switch($obj->args['type']) | |||
120 | break; | 120 | break; |
121 | 121 | ||
122 | case 'ps_data': | 122 | case 'ps_data': |
123 | $obj->ds_names = array( | 123 | $obj->legend = array( |
124 | 'value' => 'DRS', | 124 | 'value' => 'DRS', |
125 | ); | 125 | ); |
126 | $obj->colors = array( | 126 | $obj->colors = array( |
@@ -132,7 +132,7 @@ switch($obj->args['type']) | |||
132 | 132 | ||
133 | case 'ps_pagefaults': | 133 | case 'ps_pagefaults': |
134 | $obj->data_sources = array('minflt', 'majflt'); | 134 | $obj->data_sources = array('minflt', 'majflt'); |
135 | $obj->ds_names = array( | 135 | $obj->legend = array( |
136 | 'minflt' => 'Minor', | 136 | 'minflt' => 'Minor', |
137 | 'majflt' => 'Major', | 137 | 'majflt' => 'Major', |
138 | ); | 138 | ); |
@@ -145,7 +145,7 @@ switch($obj->args['type']) | |||
145 | break; | 145 | break; |
146 | 146 | ||
147 | case 'ps_rss': | 147 | case 'ps_rss': |
148 | $obj->ds_names = array( | 148 | $obj->legend = array( |
149 | 'value' => 'RSS', | 149 | 'value' => 'RSS', |
150 | ); | 150 | ); |
151 | $obj->colors = array( | 151 | $obj->colors = array( |
@@ -156,7 +156,7 @@ switch($obj->args['type']) | |||
156 | break; | 156 | break; |
157 | 157 | ||
158 | case 'ps_stacksize': | 158 | case 'ps_stacksize': |
159 | $obj->ds_names = array( | 159 | $obj->legend = array( |
160 | 'value' => 'Stacksize', | 160 | 'value' => 'Stacksize', |
161 | ); | 161 | ); |
162 | $obj->colors = array( | 162 | $obj->colors = array( |
@@ -167,7 +167,7 @@ switch($obj->args['type']) | |||
167 | break; | 167 | break; |
168 | 168 | ||
169 | case 'ps_vm': | 169 | case 'ps_vm': |
170 | $obj->ds_names = array( | 170 | $obj->legend = array( |
171 | 'value' => 'Memory', | 171 | 'value' => 'Memory', |
172 | ); | 172 | ); |
173 | $obj->colors = array( | 173 | $obj->colors = array( |
diff --git a/plugin/sensors.php b/plugin/sensors.php index 0ac2ccd..e0c0d9c 100644 --- a/plugin/sensors.php +++ b/plugin/sensors.php | |||
@@ -12,7 +12,7 @@ require_once 'type/Default.class.php'; | |||
12 | # sensors-XXXX/voltage-XXXX.rrd | 12 | # sensors-XXXX/voltage-XXXX.rrd |
13 | 13 | ||
14 | $obj = new Type_Default($CONFIG, $_GET); | 14 | $obj = new Type_Default($CONFIG, $_GET); |
15 | $obj->ds_names = array( | 15 | $obj->legend = array( |
16 | 'value' => 'Value', | 16 | 'value' => 'Value', |
17 | ); | 17 | ); |
18 | switch($obj->args['type']) { | 18 | switch($obj->args['type']) { |
diff --git a/plugin/snmp.php b/plugin/snmp.php index 4d871a8..4fbebbb 100644 --- a/plugin/snmp.php +++ b/plugin/snmp.php | |||
@@ -10,7 +10,7 @@ switch(GET('t')) { | |||
10 | require_once 'type/GenericIO.class.php'; | 10 | require_once 'type/GenericIO.class.php'; |
11 | $obj = new Type_GenericIO($CONFIG, $_GET); | 11 | $obj = new Type_GenericIO($CONFIG, $_GET); |
12 | $obj->data_sources = array('rx', 'tx'); | 12 | $obj->data_sources = array('rx', 'tx'); |
13 | $obj->ds_names = array( | 13 | $obj->legend = array( |
14 | 'rx' => 'Receive', | 14 | 'rx' => 'Receive', |
15 | 'tx' => 'Transmit', | 15 | 'tx' => 'Transmit', |
16 | ); | 16 | ); |
diff --git a/plugin/swap.php b/plugin/swap.php index 5b02130..140772c 100644 --- a/plugin/swap.php +++ b/plugin/swap.php | |||
@@ -15,7 +15,7 @@ switch(GET('t')) { | |||
15 | require_once 'type/GenericStacked.class.php'; | 15 | require_once 'type/GenericStacked.class.php'; |
16 | $obj = new Type_GenericStacked($CONFIG, $_GET); | 16 | $obj = new Type_GenericStacked($CONFIG, $_GET); |
17 | $obj->order = array('free', 'cached', 'used'); | 17 | $obj->order = array('free', 'cached', 'used'); |
18 | $obj->ds_names = array( | 18 | $obj->legend = array( |
19 | 'free' => 'Free', | 19 | 'free' => 'Free', |
20 | 'cached' => 'Cached', | 20 | 'cached' => 'Cached', |
21 | 'used' => 'Used', | 21 | 'used' => 'Used', |
@@ -32,7 +32,7 @@ switch(GET('t')) { | |||
32 | require_once 'type/GenericIO.class.php'; | 32 | require_once 'type/GenericIO.class.php'; |
33 | $obj = new Type_GenericIO($CONFIG, $_GET); | 33 | $obj = new Type_GenericIO($CONFIG, $_GET); |
34 | $obj->order = array('out', 'in'); | 34 | $obj->order = array('out', 'in'); |
35 | $obj->ds_names = array( | 35 | $obj->legend = array( |
36 | 'out' => 'Out', | 36 | 'out' => 'Out', |
37 | 'in' => 'In', | 37 | 'in' => 'In', |
38 | ); | 38 | ); |
diff --git a/plugin/tail.php b/plugin/tail.php index 91400c7..5698558 100644 --- a/plugin/tail.php +++ b/plugin/tail.php | |||
@@ -15,9 +15,9 @@ $obj->rrd_format = '%5.1lf%s'; | |||
15 | if ($CONFIG['version'] < 5) { | 15 | if ($CONFIG['version'] < 5) { |
16 | if (strcmp($obj->args['type'], 'gauge') != 0) { | 16 | if (strcmp($obj->args['type'], 'gauge') != 0) { |
17 | $obj->data_sources = array('count'); | 17 | $obj->data_sources = array('count'); |
18 | if (count($obj->ds_names) == 1) { | 18 | if (count($obj->legend) == 1) { |
19 | $obj->ds_names['count'] = $obj->ds_names['value']; | 19 | $obj->legend['count'] = $obj->legend['value']; |
20 | unset($obj->ds_names['value']); | 20 | unset($obj->legend['value']); |
21 | } | 21 | } |
22 | if (count($obj->colors) == 1) { | 22 | if (count($obj->colors) == 1) { |
23 | $obj->colors['count'] = $obj->colors['value']; | 23 | $obj->colors['count'] = $obj->colors['value']; |
diff --git a/plugin/thermal.php b/plugin/thermal.php index fb39ecb..9f25787 100644 --- a/plugin/thermal.php +++ b/plugin/thermal.php | |||
@@ -10,7 +10,7 @@ require_once 'type/Default.class.php'; | |||
10 | # thermal-XXXX/gauge.rrd | 10 | # thermal-XXXX/gauge.rrd |
11 | 11 | ||
12 | $obj = new Type_Default($CONFIG, $_GET); | 12 | $obj = new Type_Default($CONFIG, $_GET); |
13 | $obj->ds_names = array( | 13 | $obj->legend = array( |
14 | 'value' => 'Temperature', | 14 | 'value' => 'Temperature', |
15 | ); | 15 | ); |
16 | switch($obj->args['type']) { | 16 | switch($obj->args['type']) { |
diff --git a/plugin/uptime.php b/plugin/uptime.php index 20c44d3..ca45d76 100644 --- a/plugin/uptime.php +++ b/plugin/uptime.php | |||
@@ -10,7 +10,7 @@ require_once 'type/Uptime.class.php'; | |||
10 | 10 | ||
11 | $obj = new Type_Uptime($CONFIG, $_GET); | 11 | $obj = new Type_Uptime($CONFIG, $_GET); |
12 | $obj->data_sources = array('value'); | 12 | $obj->data_sources = array('value'); |
13 | $obj->ds_names = array( | 13 | $obj->legend = array( |
14 | 'value' => 'Current', | 14 | 'value' => 'Current', |
15 | ); | 15 | ); |
16 | $obj->colors = array( | 16 | $obj->colors = array( |
diff --git a/plugin/users.php b/plugin/users.php index 6b3bc4e..f49de38 100644 --- a/plugin/users.php +++ b/plugin/users.php | |||
@@ -10,7 +10,7 @@ require_once 'type/Default.class.php'; | |||
10 | 10 | ||
11 | $obj = new Type_Default($CONFIG, $_GET); | 11 | $obj = new Type_Default($CONFIG, $_GET); |
12 | $obj->data_sources = array('value'); | 12 | $obj->data_sources = array('value'); |
13 | $obj->ds_names = array( | 13 | $obj->legend = array( |
14 | 'value' => 'Users', | 14 | 'value' => 'Users', |
15 | ); | 15 | ); |
16 | $obj->colors = array( | 16 | $obj->colors = array( |
@@ -24,8 +24,8 @@ $obj->rrd_format = '%.1lf'; | |||
24 | if ($CONFIG['version'] < 5) { | 24 | if ($CONFIG['version'] < 5) { |
25 | $obj->data_sources = array('users'); | 25 | $obj->data_sources = array('users'); |
26 | 26 | ||
27 | $obj->ds_names['users'] = $obj->ds_names['value']; | 27 | $obj->legend['users'] = $obj->legend['value']; |
28 | unset($obj->ds_names['value']); | 28 | unset($obj->legend['value']); |
29 | 29 | ||
30 | $obj->colors['users'] = $obj->colors['value']; | 30 | $obj->colors['users'] = $obj->colors['value']; |
31 | unset($obj->colors['value']); | 31 | unset($obj->colors['value']); |
diff --git a/plugin/vmem.php b/plugin/vmem.php index 8fb81ce..f66272b 100644 --- a/plugin/vmem.php +++ b/plugin/vmem.php | |||
@@ -20,14 +20,14 @@ switch($obj->args['type']) { | |||
20 | $obj->data_sources = array('minflt', 'majflt'); | 20 | $obj->data_sources = array('minflt', 'majflt'); |
21 | $obj->colors = array('minflt' => '0000f0', | 21 | $obj->colors = array('minflt' => '0000f0', |
22 | 'majflt' => 'f00000'); | 22 | 'majflt' => 'f00000'); |
23 | $obj->ds_names = array('minflt' => 'Minor', | 23 | $obj->legend = array('minflt' => 'Minor', |
24 | 'majflt' => 'Major'); | 24 | 'majflt' => 'Major'); |
25 | $obj->rrd_title = 'Page faults'; | 25 | $obj->rrd_title = 'Page faults'; |
26 | $obj->rrd_vertical = ''; | 26 | $obj->rrd_vertical = ''; |
27 | break; | 27 | break; |
28 | case 'vmpage_io': | 28 | case 'vmpage_io': |
29 | $obj->data_sources = array('in', 'out'); | 29 | $obj->data_sources = array('in', 'out'); |
30 | $obj->ds_names = array('memory-in' => 'Memory (in)', | 30 | $obj->legend = array('memory-in' => 'Memory (in)', |
31 | 'memory-out' => 'Memory (out)', | 31 | 'memory-out' => 'Memory (out)', |
32 | 'swap-in' => 'Swap (in)', | 32 | 'swap-in' => 'Swap (in)', |
33 | 'swap-out' => 'Swap (out)'); | 33 | 'swap-out' => 'Swap (out)'); |
diff --git a/plugin/vserver.php b/plugin/vserver.php index 27e739f..80fad3e 100644 --- a/plugin/vserver.php +++ b/plugin/vserver.php | |||
@@ -34,7 +34,7 @@ switch($obj->args['type']) { | |||
34 | $obj = new Type_GenericStacked($CONFIG, $_GET); | 34 | $obj = new Type_GenericStacked($CONFIG, $_GET); |
35 | $obj->order = array('vm', 'vml', 'rss', 'anon'); | 35 | $obj->order = array('vm', 'vml', 'rss', 'anon'); |
36 | # http://oldwiki.linux-vserver.org/Memory+Allocation | 36 | # http://oldwiki.linux-vserver.org/Memory+Allocation |
37 | $obj->ds_names = array( | 37 | $obj->legend = array( |
38 | 'vm' => "Virtual memory pages", | 38 | 'vm' => "Virtual memory pages", |
39 | 'vml' => "Pages locked into memory", | 39 | 'vml' => "Pages locked into memory", |
40 | 'rss' => "Resident set size", | 40 | 'rss' => "Resident set size", |
@@ -57,7 +57,7 @@ switch($obj->args['type']) { | |||
57 | $obj = new Type_GenericStacked($CONFIG, $_GET); | 57 | $obj = new Type_GenericStacked($CONFIG, $_GET); |
58 | $obj->order = array('running', 'uninterruptable', 'onhold', 'total'); | 58 | $obj->order = array('running', 'uninterruptable', 'onhold', 'total'); |
59 | # http://linux-vserver.org/ProcFS | 59 | # http://linux-vserver.org/ProcFS |
60 | $obj->ds_names = array( | 60 | $obj->legend = array( |
61 | 'onhold' => "Number of threads on hold", | 61 | 'onhold' => "Number of threads on hold", |
62 | 'running' => "Number of running threads", | 62 | 'running' => "Number of running threads", |
63 | 'total' => "Total number of threads", | 63 | 'total' => "Total number of threads", |
@@ -78,7 +78,7 @@ switch($obj->args['type']) { | |||
78 | break; | 78 | break; |
79 | case 'if_octets': | 79 | case 'if_octets': |
80 | $obj->data_sources = array('rx', 'tx'); | 80 | $obj->data_sources = array('rx', 'tx'); |
81 | $obj->ds_names = array( | 81 | $obj->legend = array( |
82 | 'inet-rx' => 'IPv4 Receive', | 82 | 'inet-rx' => 'IPv4 Receive', |
83 | 'inet-tx' => 'IPv4 Transmit', | 83 | 'inet-tx' => 'IPv4 Transmit', |
84 | 'inet6-rx' => 'IPv6 Receive', | 84 | 'inet6-rx' => 'IPv6 Receive', |
@@ -105,7 +105,7 @@ switch($obj->args['type']) { | |||
105 | break; | 105 | break; |
106 | case 'vs_processes': | 106 | case 'vs_processes': |
107 | $obj->data_sources = array('value'); | 107 | $obj->data_sources = array('value'); |
108 | $obj->ds_names = array( | 108 | $obj->legend = array( |
109 | 'value' => 'Processes', | 109 | 'value' => 'Processes', |
110 | ); | 110 | ); |
111 | $obj->rrd_title = sprintf('Processes on Vserver %s', $obj->args['pinstance']); | 111 | $obj->rrd_title = sprintf('Processes on Vserver %s', $obj->args['pinstance']); |
diff --git a/plugin/wireless.php b/plugin/wireless.php index 991a0f3..cb3a8a9 100644 --- a/plugin/wireless.php +++ b/plugin/wireless.php | |||
@@ -7,7 +7,7 @@ require_once 'type/GenericStacked.class.php'; | |||
7 | 7 | ||
8 | $obj = new Type_GenericStacked($CONFIG, $_GET); | 8 | $obj = new Type_GenericStacked($CONFIG, $_GET); |
9 | $obj->data_sources = array('value'); | 9 | $obj->data_sources = array('value'); |
10 | $obj->ds_names = array('value' => 'Value'); | 10 | $obj->legend = array('value' => 'Value'); |
11 | $obj->colors = array('value' => '0000f0'); | 11 | $obj->colors = array('value' => '0000f0'); |
12 | $obj->rrd_format = '%6.1lf'; | 12 | $obj->rrd_format = '%6.1lf'; |
13 | 13 | ||
diff --git a/plugin/zfs_arc.php b/plugin/zfs_arc.php index 5fc4407..5c25c3a 100644 --- a/plugin/zfs_arc.php +++ b/plugin/zfs_arc.php | |||
@@ -35,7 +35,7 @@ switch($obj->args['type']) { | |||
35 | 'hits-prefetch_metadata' => 'ff00ff', | 35 | 'hits-prefetch_metadata' => 'ff00ff', |
36 | 'misses-prefetch_metadata' => '888800', | 36 | 'misses-prefetch_metadata' => '888800', |
37 | ); | 37 | ); |
38 | $obj->ds_names = array( | 38 | $obj->legend = array( |
39 | 'hits-demand_data' => 'data hits', | 39 | 'hits-demand_data' => 'data hits', |
40 | 'misses-demand_data' => 'metadata misses', | 40 | 'misses-demand_data' => 'metadata misses', |
41 | 'hits-demand_metadata' => 'metadata hits', | 41 | 'hits-demand_metadata' => 'metadata hits', |
@@ -64,7 +64,7 @@ switch($obj->args['type']) { | |||
64 | 'write', | 64 | 'write', |
65 | 'read', | 65 | 'read', |
66 | ); | 66 | ); |
67 | $obj->ds_names = array( | 67 | $obj->legend = array( |
68 | 'write' => 'Write', | 68 | 'write' => 'Write', |
69 | 'read' => 'Read', | 69 | 'read' => 'Read', |
70 | ); | 70 | ); |
@@ -79,7 +79,7 @@ switch($obj->args['type']) { | |||
79 | $obj->data_sources = array( | 79 | $obj->data_sources = array( |
80 | 'value', | 80 | 'value', |
81 | ); | 81 | ); |
82 | $obj->ds_names = array( | 82 | $obj->legend = array( |
83 | 'value' => 'Bytes', | 83 | 'value' => 'Bytes', |
84 | ); | 84 | ); |
85 | $obj->colors = array( | 85 | $obj->colors = array( |
diff --git a/type/Base.class.php b/type/Base.class.php index e1aae19..7c06e5d 100644 --- a/type/Base.class.php +++ b/type/Base.class.php | |||
@@ -11,7 +11,7 @@ class Type_Base { | |||
11 | var $seconds; | 11 | var $seconds; |
12 | var $data_sources = array('value'); | 12 | var $data_sources = array('value'); |
13 | var $order; | 13 | var $order; |
14 | var $ds_names; | 14 | var $legend; |
15 | var $colors; | 15 | var $colors; |
16 | var $rrd_title; | 16 | var $rrd_title; |
17 | var $rrd_vertical; | 17 | var $rrd_vertical; |
@@ -281,26 +281,26 @@ class Type_Base { | |||
281 | $sources = $this->data_sources; | 281 | $sources = $this->data_sources; |
282 | } | 282 | } |
283 | } | 283 | } |
284 | $this->parse_ds_names($sources); | 284 | $this->parse_legend($sources); |
285 | return $sources; | 285 | return $sources; |
286 | } | 286 | } |
287 | 287 | ||
288 | function parse_ds_names($sources) { | 288 | function parse_legend($sources) { |
289 | # fill ds_names if not defined by plugin | 289 | # fill legend if not defined by plugin |
290 | if (!is_array($this->ds_names)) | 290 | if (!is_array($this->legend)) |
291 | $this->ds_names = array_combine($sources, $sources); | 291 | $this->legend = array_combine($sources, $sources); |
292 | 292 | ||
293 | # detect length of longest ds_name | 293 | # detect length of longest legend |
294 | $max = 0; | 294 | $max = 0; |
295 | foreach ($this->ds_names as $ds_name) { | 295 | foreach ($this->legend as $legend) { |
296 | if(strlen((string)$ds_name) > $max) | 296 | if(strlen((string)$legend) > $max) |
297 | $max = strlen((string)$ds_name); | 297 | $max = strlen((string)$legend); |
298 | } | 298 | } |
299 | 299 | ||
300 | # make all ds_names equal in lenght | 300 | # make all legend equal in lenght |
301 | $format = sprintf("%%-%ds", $max); | 301 | $format = sprintf("%%-%ds", $max); |
302 | foreach ($this->ds_names as $index => $value) { | 302 | foreach ($this->legend as $index => $value) { |
303 | $this->ds_names[$index] = sprintf($format, $value); | 303 | $this->legend[$index] = sprintf($format, $value); |
304 | } | 304 | } |
305 | } | 305 | } |
306 | 306 | ||
diff --git a/type/Default.class.php b/type/Default.class.php index 52827c2..9f3b97a 100644 --- a/type/Default.class.php +++ b/type/Default.class.php | |||
@@ -47,9 +47,9 @@ class Type_Default extends Type_Base { | |||
47 | 47 | ||
48 | $c = 0; | 48 | $c = 0; |
49 | foreach ($sources as $source) { | 49 | foreach ($sources as $source) { |
50 | $dsname = empty($this->ds_names[$source]) ? $source : $this->ds_names[$source]; | 50 | $legend = empty($this->legend[$source]) ? $source : $this->legend[$source]; |
51 | $color = is_array($this->colors) ? (isset($this->colors[$source])?$this->colors[$source]:$this->colors[$c++]): $this->colors; | 51 | $color = is_array($this->colors) ? (isset($this->colors[$source])?$this->colors[$source]:$this->colors[$c++]): $this->colors; |
52 | $rrdgraph[] = sprintf('"LINE1:avg_%s#%s:%s"', crc32hex($source), $this->validate_color($color), $this->rrd_escape($dsname)); | 52 | $rrdgraph[] = sprintf('"LINE1:avg_%s#%s:%s"', crc32hex($source), $this->validate_color($color), $this->rrd_escape($legend)); |
53 | $rrdgraph[] = sprintf('"GPRINT:min_%s:MIN:%s Min,"', crc32hex($source), $this->rrd_format); | 53 | $rrdgraph[] = sprintf('"GPRINT:min_%s:MIN:%s Min,"', crc32hex($source), $this->rrd_format); |
54 | $rrdgraph[] = sprintf('"GPRINT:avg_%s:AVERAGE:%s Avg,"', crc32hex($source), $this->rrd_format); | 54 | $rrdgraph[] = sprintf('"GPRINT:avg_%s:AVERAGE:%s Avg,"', crc32hex($source), $this->rrd_format); |
55 | $rrdgraph[] = sprintf('"GPRINT:max_%s:MAX:%s Max,"', crc32hex($source), $this->rrd_format); | 55 | $rrdgraph[] = sprintf('"GPRINT:max_%s:MAX:%s Max,"', crc32hex($source), $this->rrd_format); |
diff --git a/type/GenericIO.class.php b/type/GenericIO.class.php index df3a057..fac7034 100644 --- a/type/GenericIO.class.php +++ b/type/GenericIO.class.php | |||
@@ -56,8 +56,8 @@ class Type_GenericIO extends Type_Base { | |||
56 | 56 | ||
57 | $i = 0; | 57 | $i = 0; |
58 | foreach($sources as $source) { | 58 | foreach($sources as $source) { |
59 | $dsname = empty($this->ds_names[$source]) ? $source : $this->ds_names[$source]; | 59 | $legend = empty($this->legend[$source]) ? $source : $this->legend[$source]; |
60 | $rrdgraph[] = sprintf('"LINE1:avg_%s%s#%s:%s"', crc32hex($source), $i == 1 ? '_neg' : '', $this->colors[$source], $this->rrd_escape($dsname)); | 60 | $rrdgraph[] = sprintf('"LINE1:avg_%s%s#%s:%s"', crc32hex($source), $i == 1 ? '_neg' : '', $this->colors[$source], $this->rrd_escape($legend)); |
61 | $rrdgraph[] = sprintf('"GPRINT:min_%s:MIN:%s Min,"', crc32hex($source), $this->rrd_format); | 61 | $rrdgraph[] = sprintf('"GPRINT:min_%s:MIN:%s Min,"', crc32hex($source), $this->rrd_format); |
62 | $rrdgraph[] = sprintf('"GPRINT:avg_%s:AVERAGE:%s Avg,"', crc32hex($source), $this->rrd_format); | 62 | $rrdgraph[] = sprintf('"GPRINT:avg_%s:AVERAGE:%s Avg,"', crc32hex($source), $this->rrd_format); |
63 | $rrdgraph[] = sprintf('"GPRINT:max_%s:MAX:%s Max,"', crc32hex($source), $this->rrd_format); | 63 | $rrdgraph[] = sprintf('"GPRINT:max_%s:MAX:%s Max,"', crc32hex($source), $this->rrd_format); |
diff --git a/type/GenericStacked.class.php b/type/GenericStacked.class.php index 4a08c91..a74ff18 100644 --- a/type/GenericStacked.class.php +++ b/type/GenericStacked.class.php | |||
@@ -49,9 +49,9 @@ class Type_GenericStacked extends Type_Base { | |||
49 | 49 | ||
50 | $c = 0; | 50 | $c = 0; |
51 | foreach ($sources as $source) { | 51 | foreach ($sources as $source) { |
52 | $dsname = empty($this->ds_names[$source]) ? $source : $this->ds_names[$source]; | 52 | $legend = empty($this->legend[$source]) ? $source : $this->legend[$source]; |
53 | $color = is_array($this->colors) ? (isset($this->colors[$source])?$this->colors[$source]:$this->colors[$c++]) : $this->colors; | 53 | $color = is_array($this->colors) ? (isset($this->colors[$source])?$this->colors[$source]:$this->colors[$c++]) : $this->colors; |
54 | $rrdgraph[] = sprintf('"LINE1:area_%s#%s:%s"', crc32hex($source), $this->validate_color($color), $this->rrd_escape($dsname)); | 54 | $rrdgraph[] = sprintf('"LINE1:area_%s#%s:%s"', crc32hex($source), $this->validate_color($color), $this->rrd_escape($legend)); |
55 | $rrdgraph[] = sprintf('"GPRINT:min_%s:MIN:%s Min,"', crc32hex($source), $this->rrd_format); | 55 | $rrdgraph[] = sprintf('"GPRINT:min_%s:MIN:%s Min,"', crc32hex($source), $this->rrd_format); |
56 | $rrdgraph[] = sprintf('"GPRINT:avg_%s:AVERAGE:%s Avg,"', crc32hex($source), $this->rrd_format); | 56 | $rrdgraph[] = sprintf('"GPRINT:avg_%s:AVERAGE:%s Avg,"', crc32hex($source), $this->rrd_format); |
57 | $rrdgraph[] = sprintf('"GPRINT:max_%s:MAX:%s Max,"', crc32hex($source), $this->rrd_format); | 57 | $rrdgraph[] = sprintf('"GPRINT:max_%s:MAX:%s Max,"', crc32hex($source), $this->rrd_format); |
diff --git a/type/Uptime.class.php b/type/Uptime.class.php index 3f8a01e..e57df0b 100644 --- a/type/Uptime.class.php +++ b/type/Uptime.class.php | |||
@@ -41,11 +41,11 @@ class Type_Uptime extends Type_Base { | |||
41 | 41 | ||
42 | $c = 0; | 42 | $c = 0; |
43 | foreach ($sources as $source) { | 43 | foreach ($sources as $source) { |
44 | $dsname = empty($this->ds_names[$source]) ? $source : $this->ds_names[$source]; | 44 | $legend = empty($this->legend[$source]) ? $source : $this->legend[$source]; |
45 | $color = is_array($this->colors) ? (isset($this->colors[$source])?$this->colors[$source]:$this->colors[$c++]) : $this->colors; | 45 | $color = is_array($this->colors) ? (isset($this->colors[$source])?$this->colors[$source]:$this->colors[$c++]) : $this->colors; |
46 | 46 | ||
47 | //current value | 47 | //current value |
48 | $rrdgraph[] = sprintf('"LINE1:area_%s#%s:%s"', crc32hex($source), $this->validate_color($color), $this->rrd_escape($dsname)); | 48 | $rrdgraph[] = sprintf('"LINE1:area_%s#%s:%s"', crc32hex($source), $this->validate_color($color), $this->rrd_escape($legend)); |
49 | $rrdgraph[] = sprintf('"GPRINT:c_avg_%s:LAST:%s days\\l"', crc32hex($source), $this->rrd_format); | 49 | $rrdgraph[] = sprintf('"GPRINT:c_avg_%s:LAST:%s days\\l"', crc32hex($source), $this->rrd_format); |
50 | 50 | ||
51 | //max value | 51 | //max value |