2010-07-18 03:56:19 +00:00
|
|
|
<?php
|
|
|
|
|
2011-03-17 13:35:25 +00:00
|
|
|
include("includes/graphs/common.inc.php");
|
2010-07-18 03:56:19 +00:00
|
|
|
|
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('snmpInTraps',
|
|
|
|
'snmpOutTraps',
|
|
|
|
'snmpInTotalReqVars',
|
|
|
|
'snmpInTotalSetVars',
|
|
|
|
'snmpOutGetResponses',
|
|
|
|
'snmpOutSetRequests');
|
|
|
|
|
|
|
|
$i=0;
|
|
|
|
foreach($stats as $stat)
|
|
|
|
{
|
|
|
|
$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';
|
|
|
|
|
|
|
|
$scale_min = "0";
|
|
|
|
$nototal = 1;
|
|
|
|
$basicrrd = 1;
|
|
|
|
|
|
|
|
include("includes/graphs/generic_multi_line.inc.php");
|
|
|
|
|
|
|
|
?>
|