2010-07-18 03:56:19 +00:00
|
|
|
<?php
|
|
|
|
|
2011-03-17 13:35:25 +00:00
|
|
|
$device = device_by_id_cache($id);
|
2010-07-18 03:56:19 +00:00
|
|
|
|
2011-03-17 13:35:25 +00:00
|
|
|
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/netstats-snmp.rrd";
|
2010-07-18 03:56:19 +00:00
|
|
|
|
2011-09-18 22:55:29 +00:00
|
|
|
$stats = array('snmpInPkts',
|
|
|
|
'snmpOutPkts');
|
|
|
|
|
|
|
|
$i=0;
|
2011-10-04 09:10:21 +00:00
|
|
|
foreach ($stats as $stat)
|
2011-09-18 22:55:29 +00:00
|
|
|
{
|
|
|
|
$i++;
|
|
|
|
$rrd_list[$i]['filename'] = $rrd_filename;
|
|
|
|
$rrd_list[$i]['descr'] = str_replace("snmp", "", $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';
|
|
|
|
|
|
|
|
$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");
|
|
|
|
|
|
|
|
?>
|