2009-10-28 13:52:39 +00:00
|
|
|
<?php
|
|
|
|
|
2010-08-01 00:38:01 +00:00
|
|
|
## Cycle through dot3stats OIDs and build list of RRAs to pass to multi simplex grapher
|
2009-10-28 13:52:39 +00:00
|
|
|
|
|
|
|
$oids = array('dot3StatsAlignmentErrors', 'dot3StatsFCSErrors', 'dot3StatsSingleCollisionFrames', 'dot3StatsMultipleCollisionFrames',
|
|
|
|
'dot3StatsSQETestErrors', 'dot3StatsDeferredTransmissions', 'dot3StatsLateCollisions', 'dot3StatsExcessiveCollisions',
|
|
|
|
'dot3StatsInternalMacTransmitErrors', 'dot3StatsCarrierSenseErrors', 'dot3StatsFrameTooLongs', 'dot3StatsInternalMacReceiveErrors',
|
|
|
|
'dot3StatsSymbolErrors');
|
|
|
|
|
|
|
|
$i=0;
|
2010-08-01 00:38:01 +00:00
|
|
|
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("etherlike-" . $port['ifIndex'] . ".rrd");
|
|
|
|
if(is_file($rrd_filename)) {
|
2009-10-28 13:52:39 +00:00
|
|
|
foreach($oids as $oid){
|
|
|
|
$oid = str_replace("dot3Stats", "", $oid);
|
|
|
|
$oid_rra = truncate($oid, 19, '');
|
2010-08-01 00:38:01 +00:00
|
|
|
$rrd_list[$i]['filename'] = $rrd_filename;
|
2009-10-28 13:52:39 +00:00
|
|
|
$rrd_list[$i]['descr'] = $oid;
|
|
|
|
$rrd_list[$i]['rra'] = $oid_rra;
|
|
|
|
$i++;
|
|
|
|
}
|
2010-02-24 21:44:32 +00:00
|
|
|
} else {echo("file missing: $file"); }
|
|
|
|
|
2009-11-20 00:36:42 +00:00
|
|
|
$colours = "mixed";
|
|
|
|
$nototal = 1;
|
|
|
|
$unit_text = "Errors";
|
2009-10-28 13:52:39 +00:00
|
|
|
|
2010-07-24 19:14:41 +00:00
|
|
|
include ("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
2009-10-28 13:52:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
?>
|