From: octo Date: Sun, 16 Apr 2006 13:59:41 +0000 (+0000) Subject: Added `temperature' and `fanspeed' to `collection.cgi'. This is needed for the X-Git-Tag: liboping-0.1.0~73 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4eb4e3fd530d29bd48f05166b00767f4c2698acc;p=collectd.git Added `temperature' and `fanspeed' to `collection.cgi'. This is needed for the `apple_sensors' plugin. --- diff --git a/contrib/collection.cgi b/contrib/collection.cgi index 51e187de..fbfd2299 100755 --- a/contrib/collection.cgi +++ b/contrib/collection.cgi @@ -235,6 +235,18 @@ our $GraphDefs; 'GPRINT:total_max_ms:MAX:%5.1lf%s Max,', 'GPRINT:total_avg_ms:LAST:%5.1lf%s Last' ], + fanspeed => [ + 'DEF:temp_avg={file}:value:AVERAGE', + 'DEF:temp_min={file}:value:MIN', + 'DEF:temp_max={file}:value:MAX', + "AREA:temp_max#$HalfBlue", + "AREA:temp_min#$Canvas", + "LINE1:temp_avg#$FullBlue:RPM", + 'GPRINT:temp_min:MIN:%4.1lf Min,', + 'GPRINT:temp_avg:AVERAGE:%4.1lf Avg,', + 'GPRINT:temp_max:MAX:%4.1lf Max,', + 'GPRINT:temp_avg:LAST:%4.1lf Last\l' + ], hddtemp => [ 'DEF:temp_avg={file}:value:AVERAGE', 'DEF:temp_min={file}:value:MIN', @@ -635,18 +647,6 @@ our $GraphDefs; 'GPRINT:sleeping_max:MAX:%5.1lf Max,', 'GPRINT:sleeping_avg:LAST:%5.1lf Last\l' ], - sensors => [ - 'DEF:temp_avg={file}:value:AVERAGE', - 'DEF:temp_min={file}:value:MIN', - 'DEF:temp_max={file}:value:MAX', - "AREA:temp_max#$HalfBlue", - "AREA:temp_min#$Canvas", - "LINE1:temp_avg#$FullBlue:Value", - 'GPRINT:temp_min:MIN:%4.1lf Min,', - 'GPRINT:temp_avg:AVERAGE:%4.1lf Avg,', - 'GPRINT:temp_max:MAX:%4.1lf Max,', - 'GPRINT:temp_avg:LAST:%4.1lf Last\l' - ], swap => [ 'DEF:used_avg={file}:used:AVERAGE', 'DEF:used_min={file}:used:MIN', @@ -691,6 +691,18 @@ our $GraphDefs; 'GPRINT:used_max:MAX:%5.1lf%s Max,', 'GPRINT:used_avg:LAST:%5.1lf%s Last\l' ], + temperature => [ + 'DEF:temp_avg={file}:value:AVERAGE', + 'DEF:temp_min={file}:value:MIN', + 'DEF:temp_max={file}:value:MAX', + "AREA:temp_max#$HalfBlue", + "AREA:temp_min#$Canvas", + "LINE1:temp_avg#$FullBlue:Value", + 'GPRINT:temp_min:MIN:%4.1lf Min,', + 'GPRINT:temp_avg:AVERAGE:%4.1lf Avg,', + 'GPRINT:temp_max:MAX:%4.1lf Max,', + 'GPRINT:temp_avg:LAST:%4.1lf Last\l' + ], traffic => ['DEF:out_min_raw={file}:outgoing:MIN', 'DEF:out_avg_raw={file}:outgoing:AVERAGE', 'DEF:out_max_raw={file}:outgoing:MAX', @@ -845,6 +857,7 @@ our $GraphDefs; }; $GraphDefs->{'disk'} = $GraphDefs->{'partition'}; $GraphDefs->{'meminfo'} = $GraphDefs->{'memory'}; + $GraphDefs->{'sensors'} = $GraphDefs->{'temperature'}; } our $GraphArgs = @@ -859,6 +872,7 @@ our $GraphArgs = #disk => ['-t', '{host} disk {inst} IO wait', '-v', 'Seconds'], df => ['-t', '{host}:{inst} usage', '-v', 'Percent', '-l', '0'], disk => ['-t', '{host} disk {inst} usage', '-v', 'Byte/s'], + fanspeed => ['-t', '{host} fanspeed {inst}', '-v', 'rpm'], hddtemp => ['-t', '{host} hdd temperature {inst}', '-v', '°Celsius'], load => ['-t', '{host} load average', '-v', 'System load', '-X', '0'], mails => ['-t', '{host} mail count', '-v', 'Amount', '-X', '0'], @@ -873,6 +887,7 @@ our $GraphArgs = processes => ['-t', '{host} processes', '-v', 'Processes'], sensors => ['-t', '{host} sensor {inst}', '-v', '°Celsius'], swap => ['-t', '{host} swap usage', '-v', 'Bytes', '-b', '1024', '-l', '0'], + temperature => ['-t', '{host} temperature {inst}', '-v', '°Celsius'], traffic => ['-t', '{host} {inst} traffic', '-v', 'Bit/s'], users => ['-t', '{host} users', '-v', 'Users'], voltage => ['-t', '{host} voltage', '-v', 'Volts'],