summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2b0cb61)
raw | patch | inline | side by side (parent: 2b0cb61)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sun, 9 Jul 2006 10:34:55 +0000 (12:34 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sun, 9 Jul 2006 10:34:55 +0000 (12:34 +0200) |
contrib/collection.cgi | patch | blob | history |
diff --git a/contrib/collection.cgi b/contrib/collection.cgi
index eb97d63825941d6b25b54f1c81ff31bb1c8b6733..098c702df0f5d91d87f58a50a4c7b7995d7a1e2a 100755 (executable)
--- a/contrib/collection.cgi
+++ b/contrib/collection.cgi
'GPRINT:temp_max:MAX:%4.1lf Max,',
'GPRINT:temp_avg:LAST:%4.1lf Last\l'
],
+ if_packets => ['DEF:tx_min={file}:tx:MIN',
+ 'DEF:tx_avg={file}:tx:AVERAGE',
+ 'DEF:tx_max={file}:tx:MAX',
+ 'DEF:rx_min={file}:rx:MIN',
+ 'DEF:rx_avg={file}:rx:AVERAGE',
+ 'DEF:rx_max={file}:rx:MAX',
+ 'CDEF:overlap=tx_avg,rx_avg,GT,rx_avg,tx_avg,IF',
+ 'CDEF:mytime=tx_avg,TIME,TIME,IF',
+ 'CDEF:sample_len_raw=mytime,PREV(mytime),-',
+ 'CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF',
+ 'CDEF:tx_avg_sample=tx_avg,UN,0,tx_avg,IF,sample_len,*',
+ 'CDEF:tx_avg_sum=PREV,UN,0,PREV,IF,tx_avg_sample,+',
+ 'CDEF:rx_avg_sample=rx_avg,UN,0,rx_avg,IF,sample_len,*',
+ 'CDEF:rx_avg_sum=PREV,UN,0,PREV,IF,rx_avg_sample,+',
+ "AREA:tx_avg#$HalfGreen",
+ "AREA:rx_avg#$HalfBlue",
+ "AREA:overlap#$HalfBlueGreen",
+ "LINE1:tx_avg#$FullGreen:TX",
+ 'GPRINT:tx_avg:AVERAGE:%5.1lf%s Avg,',
+ 'GPRINT:tx_max:MAX:%5.1lf%s Max,',
+ 'GPRINT:tx_avg:LAST:%5.1lf%s Last',
+ 'GPRINT:tx_avg_sum:LAST:(ca. %.0lf Total)\l',
+ "LINE1:rx_avg#$FullBlue:RX",
+ #'GPRINT:rx_min:MIN:%5.1lf %s Min,',
+ 'GPRINT:rx_avg:AVERAGE:%5.1lf%s Avg,',
+ 'GPRINT:rx_max:MAX:%5.1lf%s Max,',
+ 'GPRINT:rx_avg:LAST:%5.1lf%s Last',
+ 'GPRINT:rx_avg_sum:LAST:(ca. %.0lf Total)\l'
+ ],
load => ['DEF:s_avg={file}:shortterm:AVERAGE',
'DEF:s_min={file}:shortterm:MIN',
'DEF:s_max={file}:shortterm:MAX',
],
};
$GraphDefs->{'disk'} = $GraphDefs->{'partition'};
+ $GraphDefs->{'if_errors'} = $GraphDefs->{'if_packets'};
$GraphDefs->{'meminfo'} = $GraphDefs->{'memory'};
$GraphDefs->{'sensors'} = $GraphDefs->{'temperature'};
fanspeed => ['-t', '{host} fanspeed {inst}', '-v', 'rpm'],
frequency_offset => ['-t', 'NTPd frequency offset ({inst})', '-v', 'Parts per million'],
hddtemp => ['-t', '{host} hdd temperature {inst}', '-v', '°Celsius'],
+ if_errors => ['-t', '{host} {inst} errors', '-v', 'Errors/s'],
+ if_packets => ['-t', '{host} {inst} packets', '-v', 'Packets/s'],
load => ['-t', '{host} load average', '-v', 'System load', '-X', '0'],
load_percent => ['-t', '{host} load', '-v', 'Percent'],
mails => ['-t', '{host} mail count', '-v', 'Amount', '-X', '0'],