2009-10-27 13:04:16 +00:00
|
|
|
<?php
|
|
|
|
|
2011-03-17 13:35:25 +00:00
|
|
|
$device = device_by_id_cache($id);
|
2010-05-02 19:47:09 +00:00
|
|
|
|
2011-03-17 13:35:25 +00:00
|
|
|
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/netstats-icmp.rrd";
|
2009-10-27 13:04:16 +00:00
|
|
|
|
2011-09-18 22:55:29 +00:00
|
|
|
$stats = array('icmpInMsgs' => '00cc00',
|
|
|
|
'icmpOutMsgs' => '006600',
|
|
|
|
'icmpInErrors' => 'cc0000',
|
|
|
|
'icmpOutErrors' => '660000',
|
|
|
|
'icmpInEchos' => '0066cc',
|
|
|
|
'icmpOutEchos' => '003399',
|
|
|
|
'icmpInEchoReps' => 'cc00cc',
|
|
|
|
'icmpOutEchoReps' => '990099');
|
|
|
|
|
|
|
|
$i=0;
|
|
|
|
|
2011-10-04 09:10:21 +00:00
|
|
|
foreach ($stats as $stat => $colour)
|
2011-09-18 22:55:29 +00:00
|
|
|
{
|
|
|
|
$i++;
|
|
|
|
$rrd_list[$i]['filename'] = $rrd_filename;
|
|
|
|
$rrd_list[$i]['descr'] = str_replace("icmp", "", $stat);
|
2011-09-21 11:59:59 +00:00
|
|
|
$rrd_list[$i]['ds'] = $stat;
|
2011-09-20 14:37:54 +00:00
|
|
|
if (strpos($stat, "Out") !== FALSE)
|
2011-09-18 22:55:29 +00:00
|
|
|
{
|
|
|
|
$rrd_list[$i]['invert'] = TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$colours='mixed';
|
|
|
|
|
|
|
|
$scale_min = "0";
|
|
|
|
$nototal = 1;
|
2011-09-30 13:31:00 +00:00
|
|
|
$simple_rrd = TRUE;
|
2011-09-18 22:55:29 +00:00
|
|
|
|
|
|
|
include("includes/graphs/generic_multi_line.inc.php");
|
|
|
|
|
|
|
|
?>
|