aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPim van den Berg2009-12-31 11:42:14 +0100
committerPim van den Berg2009-12-31 12:39:43 +0100
commit853a4e939c99fb683983d947f4267bf249f7c05e (patch)
treecfffabaa43f218fbc29c2b00cc7ceb36168a8b90
parentreplace duplicate code by function rrd_options (diff)
downloadapt-panopticon_cgp-853a4e939c99fb683983d947f4267bf249f7c05e.zip
apt-panopticon_cgp-853a4e939c99fb683983d947f4267bf249f7c05e.tar.gz
apt-panopticon_cgp-853a4e939c99fb683983d947f4267bf249f7c05e.tar.bz2
apt-panopticon_cgp-853a4e939c99fb683983d947f4267bf249f7c05e.tar.xz
always show 'on $host' in the rrd title
'on $host' doesn't have to be added manually to rrd_title anymore.
Diffstat (limited to '')
-rw-r--r--plugin/cpu.php2
-rw-r--r--plugin/df.php2
-rw-r--r--plugin/disk.php8
-rw-r--r--plugin/entropy.php2
-rw-r--r--plugin/interface.php6
-rw-r--r--plugin/irq.php2
-rw-r--r--plugin/load.php2
-rw-r--r--plugin/memory.php2
-rw-r--r--plugin/processes.php2
-rw-r--r--plugin/sensors.php6
-rw-r--r--plugin/swap.php2
-rw-r--r--plugin/users.php2
-rw-r--r--type/Default.class.php2
13 files changed, 20 insertions, 20 deletions
diff --git a/plugin/cpu.php b/plugin/cpu.php
index 5f688f4..4cc74f6 100644
--- a/plugin/cpu.php
+++ b/plugin/cpu.php
@@ -55,7 +55,7 @@ $obj->width = $width;
55$obj->heigth = $heigth; 55$obj->heigth = $heigth;
56$obj->seconds = $seconds; 56$obj->seconds = $seconds;
57 57
58$obj->rrd_title = "CPU-$pinstance usage on $host"; 58$obj->rrd_title = sprintf('CPU-%s usage', $pinstance);
59$obj->rrd_vertical = 'Jiffies'; 59$obj->rrd_vertical = 'Jiffies';
60$obj->rrd_format = '%5.2lf'; 60$obj->rrd_format = '%5.2lf';
61 61
diff --git a/plugin/df.php b/plugin/df.php
index 6d7414b..bf9b850 100644
--- a/plugin/df.php
+++ b/plugin/df.php
@@ -33,7 +33,7 @@ $obj->width = $width;
33$obj->heigth = $heigth; 33$obj->heigth = $heigth;
34$obj->seconds = $seconds; 34$obj->seconds = $seconds;
35 35
36$obj->rrd_title = "Free space ($tinstance) on $host"; 36$obj->rrd_title = sprintf('Free space (%s)', $tinstance);
37$obj->rrd_vertical = 'Bytes'; 37$obj->rrd_vertical = 'Bytes';
38$obj->rrd_format = '%5.1lf%sB'; 38$obj->rrd_format = '%5.1lf%sB';
39 39
diff --git a/plugin/disk.php b/plugin/disk.php
index 45b5fde..620b188 100644
--- a/plugin/disk.php
+++ b/plugin/disk.php
@@ -36,22 +36,22 @@ $obj->heigth = $heigth;
36$obj->seconds = $seconds; 36$obj->seconds = $seconds;
37switch($type) { 37switch($type) {
38 case 'disk_merged': 38 case 'disk_merged':
39 $obj->rrd_title = "Disk Merged Operations ($pinstance) on $host"; 39 $obj->rrd_title = sprintf('Disk Merged Operations (%s)', $pinstance);
40 $obj->rrd_vertical = 'Merged operations/s'; 40 $obj->rrd_vertical = 'Merged operations/s';
41 $obj->rrd_format = '%5.1lf'; 41 $obj->rrd_format = '%5.1lf';
42 break; 42 break;
43 case 'disk_octets': 43 case 'disk_octets':
44 $obj->rrd_title = "Disk Traffic ($pinstance) on $host"; 44 $obj->rrd_title = sprintf('Disk Traffic (%s)', $pinstance);
45 $obj->rrd_vertical = 'Bytes per second'; 45 $obj->rrd_vertical = 'Bytes per second';
46 $obj->rrd_format = '%5.1lf%s'; 46 $obj->rrd_format = '%5.1lf%s';
47 break; 47 break;
48 case 'disk_ops': 48 case 'disk_ops':
49 $obj->rrd_title = "Disk Operations ($pinstance) on $host"; 49 $obj->rrd_title = sprintf('Disk Operations (%s)', $pinstance);
50 $obj->rrd_vertical = 'Ops per second'; 50 $obj->rrd_vertical = 'Ops per second';
51 $obj->rrd_format = '%5.1lf'; 51 $obj->rrd_format = '%5.1lf';
52 break; 52 break;
53 case 'disk_time': 53 case 'disk_time':
54 $obj->rrd_title = "Disk time per operation ($pinstance) on $host"; 54 $obj->rrd_title = sprintf('Disk time per operation (%s)', $pinstance);
55 $obj->rrd_vertical = 'Avg. Time/Op'; 55 $obj->rrd_vertical = 'Avg. Time/Op';
56 $obj->rrd_format = '%5.1lf%ss'; 56 $obj->rrd_format = '%5.1lf%ss';
57 $obj->scale = '0.001'; 57 $obj->scale = '0.001';
diff --git a/plugin/entropy.php b/plugin/entropy.php
index a4379ab..6ee96aa 100644
--- a/plugin/entropy.php
+++ b/plugin/entropy.php
@@ -28,7 +28,7 @@ $obj->colors = array(
28$obj->width = $width; 28$obj->width = $width;
29$obj->heigth = $heigth; 29$obj->heigth = $heigth;
30$obj->seconds = $seconds; 30$obj->seconds = $seconds;
31$obj->rrd_title = "Available entropy on $host"; 31$obj->rrd_title = 'Available entropy';
32$obj->rrd_vertical = 'Bits'; 32$obj->rrd_vertical = 'Bits';
33$obj->rrd_format = '%4.0lf'; 33$obj->rrd_format = '%4.0lf';
34 34
diff --git a/plugin/interface.php b/plugin/interface.php
index 45e3cf1..7d8d929 100644
--- a/plugin/interface.php
+++ b/plugin/interface.php
@@ -36,15 +36,15 @@ $obj->seconds = $seconds;
36$obj->rrd_format = '%5.1lf%s'; 36$obj->rrd_format = '%5.1lf%s';
37switch($type) { 37switch($type) {
38 case 'if_errors': 38 case 'if_errors':
39 $obj->rrd_title = "Interface Errors ($tinstance) on $host"; 39 $obj->rrd_title = sprintf('Interface Errors (%s)', $tinstance);
40 $obj->rrd_vertical = 'Errors per second'; 40 $obj->rrd_vertical = 'Errors per second';
41 break; 41 break;
42 case 'if_octets': 42 case 'if_octets':
43 $obj->rrd_title = "Interface Traffic ($tinstance) on $host"; 43 $obj->rrd_title = sprintf('Interface Traffic (%s)', $tinstance);
44 $obj->rrd_vertical = 'Bits per second'; 44 $obj->rrd_vertical = 'Bits per second';
45 break; 45 break;
46 case 'if_packets': 46 case 'if_packets':
47 $obj->rrd_title = "Interface Packets ($tinstance) on $host"; 47 $obj->rrd_title = sprintf('Interface Packets (%s)', $tinstance);
48 $obj->rrd_vertical = 'Packets per second'; 48 $obj->rrd_vertical = 'Packets per second';
49 break; 49 break;
50} 50}
diff --git a/plugin/irq.php b/plugin/irq.php
index 95bddcf..d6b1e72 100644
--- a/plugin/irq.php
+++ b/plugin/irq.php
@@ -30,7 +30,7 @@ $obj->width = $width;
30$obj->heigth = $heigth; 30$obj->heigth = $heigth;
31$obj->seconds = $seconds; 31$obj->seconds = $seconds;
32 32
33$obj->rrd_title = "Interrupts on $host"; 33$obj->rrd_title = 'Interrupts';
34$obj->rrd_vertical = 'IRQs/s'; 34$obj->rrd_vertical = 'IRQs/s';
35$obj->rrd_format = '%6.1lf'; 35$obj->rrd_format = '%6.1lf';
36 36
diff --git a/plugin/load.php b/plugin/load.php
index 83fcf19..523f14c 100644
--- a/plugin/load.php
+++ b/plugin/load.php
@@ -32,7 +32,7 @@ $obj->colors = array(
32$obj->width = $width; 32$obj->width = $width;
33$obj->heigth = $heigth; 33$obj->heigth = $heigth;
34$obj->seconds = $seconds; 34$obj->seconds = $seconds;
35$obj->rrd_title = "System load on $host"; 35$obj->rrd_title = 'System load';
36$obj->rrd_vertical = 'System load'; 36$obj->rrd_vertical = 'System load';
37$obj->rrd_format = '%.2lf'; 37$obj->rrd_format = '%.2lf';
38 38
diff --git a/plugin/memory.php b/plugin/memory.php
index 7b0e47b..b0f6b73 100644
--- a/plugin/memory.php
+++ b/plugin/memory.php
@@ -43,7 +43,7 @@ $obj->width = $width;
43$obj->heigth = $heigth; 43$obj->heigth = $heigth;
44$obj->seconds = $seconds; 44$obj->seconds = $seconds;
45 45
46$obj->rrd_title = "Physical memory utilization on $host"; 46$obj->rrd_title = 'Physical memory utilization';
47$obj->rrd_vertical = 'Bytes'; 47$obj->rrd_vertical = 'Bytes';
48$obj->rrd_format = '%5.1lf%s'; 48$obj->rrd_format = '%5.1lf%s';
49 49
diff --git a/plugin/processes.php b/plugin/processes.php
index 5fc0463..65e1ddd 100644
--- a/plugin/processes.php
+++ b/plugin/processes.php
@@ -48,7 +48,7 @@ $obj->width = $width;
48$obj->heigth = $heigth; 48$obj->heigth = $heigth;
49$obj->seconds = $seconds; 49$obj->seconds = $seconds;
50 50
51$obj->rrd_title = "Processes on $host"; 51$obj->rrd_title = 'Processes';
52$obj->rrd_vertical = 'Processes'; 52$obj->rrd_vertical = 'Processes';
53$obj->rrd_format = '%5.1lf%s'; 53$obj->rrd_format = '%5.1lf%s';
54 54
diff --git a/plugin/sensors.php b/plugin/sensors.php
index ddcf521..048f9f1 100644
--- a/plugin/sensors.php
+++ b/plugin/sensors.php
@@ -34,19 +34,19 @@ $obj->seconds = $seconds;
34switch($type) { 34switch($type) {
35 case 'fanspeed': 35 case 'fanspeed':
36 $obj->colors = '00ff00'; 36 $obj->colors = '00ff00';
37 $obj->rrd_title = "Fanspeed ($pinstance) on $host"; 37 $obj->rrd_title = sprintf('Fanspeed (%s)', $pinstance);
38 $obj->rrd_vertical = 'RPM'; 38 $obj->rrd_vertical = 'RPM';
39 $obj->rrd_format = '%5.1lf'; 39 $obj->rrd_format = '%5.1lf';
40 break; 40 break;
41 case 'temperature': 41 case 'temperature':
42 $obj->colors = '0000ff'; 42 $obj->colors = '0000ff';
43 $obj->rrd_title = "Temperature ($pinstance) on $host"; 43 $obj->rrd_title = sprintf('Temperature (%s)', $pinstance);
44 $obj->rrd_vertical = 'Celius'; 44 $obj->rrd_vertical = 'Celius';
45 $obj->rrd_format = '%5.1lf%s'; 45 $obj->rrd_format = '%5.1lf%s';
46 break; 46 break;
47 case 'voltage': 47 case 'voltage':
48 $obj->colors = 'ff0000'; 48 $obj->colors = 'ff0000';
49 $obj->rrd_title = "Voltage ($pinstance) on $host"; 49 $obj->rrd_title = sprintf('Voltage (%s)', $pinstance);
50 $obj->rrd_vertical = 'Volt'; 50 $obj->rrd_vertical = 'Volt';
51 $obj->rrd_format = '%5.1lf'; 51 $obj->rrd_format = '%5.1lf';
52 break; 52 break;
diff --git a/plugin/swap.php b/plugin/swap.php
index 8173890..638ddc3 100644
--- a/plugin/swap.php
+++ b/plugin/swap.php
@@ -45,7 +45,7 @@ $obj->width = $width;
45$obj->heigth = $heigth; 45$obj->heigth = $heigth;
46$obj->seconds = $seconds; 46$obj->seconds = $seconds;
47 47
48$obj->rrd_title = "Swap utilization on $host"; 48$obj->rrd_title = 'Swap utilization';
49$obj->rrd_vertical = 'Bytes'; 49$obj->rrd_vertical = 'Bytes';
50$obj->rrd_format = '%5.1lf%s'; 50$obj->rrd_format = '%5.1lf%s';
51 51
diff --git a/plugin/users.php b/plugin/users.php
index 1555927..5ebee43 100644
--- a/plugin/users.php
+++ b/plugin/users.php
@@ -28,7 +28,7 @@ $obj->colors = array(
28$obj->width = $width; 28$obj->width = $width;
29$obj->heigth = $heigth; 29$obj->heigth = $heigth;
30$obj->seconds = $seconds; 30$obj->seconds = $seconds;
31$obj->rrd_title = "Users on $host"; 31$obj->rrd_title = 'Users';
32$obj->rrd_vertical = 'Users'; 32$obj->rrd_vertical = 'Users';
33$obj->rrd_format = '%.1lf'; 33$obj->rrd_format = '%.1lf';
34 34
diff --git a/type/Default.class.php b/type/Default.class.php
index 817521a..6b1ab5c 100644
--- a/type/Default.class.php
+++ b/type/Default.class.php
@@ -89,7 +89,7 @@ class Type_Default {
89 $rrdgraph[] = sprintf('-w %d', is_numeric($this->width) ? $this->width : 400); 89 $rrdgraph[] = sprintf('-w %d', is_numeric($this->width) ? $this->width : 400);
90 $rrdgraph[] = sprintf('-h %d', is_numeric($this->heigth) ? $this->heigth : 175); 90 $rrdgraph[] = sprintf('-h %d', is_numeric($this->heigth) ? $this->heigth : 175);
91 $rrdgraph[] = '-l 0'; 91 $rrdgraph[] = '-l 0';
92 $rrdgraph[] = sprintf('-t "%s"', $this->rrd_title); 92 $rrdgraph[] = sprintf('-t "%s on %s"', $this->rrd_title, $this->args['host']);
93 $rrdgraph[] = sprintf('-v "%s"', $this->rrd_vertical); 93 $rrdgraph[] = sprintf('-v "%s"', $this->rrd_vertical);
94 $rrdgraph[] = sprintf('-s -%d', is_numeric($this->seconds) ? $this->seconds : 86400); 94 $rrdgraph[] = sprintf('-s -%d', is_numeric($this->seconds) ? $this->seconds : 86400);
95 95