Files
librenms-librenms/html/includes/graphs/device/netstat_icmp.inc.php
T

41 lines
945 B
PHP
Raw Normal View History

2009-10-27 13:04:16 +00:00
<?php
2011-03-17 13:35:25 +00:00
include("includes/graphs/common.inc.php");
2009-10-27 13:04:16 +00:00
2011-03-17 13:35:25 +00:00
$device = device_by_id_cache($id);
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-09-20 09:55:11 +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);
$rrd_list[$i]['rra'] = $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;
$basicrrd = 1;
include("includes/graphs/generic_multi_line.inc.php");
?>