2009-10-28 13:52:39 +00:00
|
|
|
<?php
|
|
|
|
|
2012-05-25 12:24:34 +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');
|
|
|
|
|
2011-03-17 13:25:37 +00:00
|
|
|
$i = 0;
|
2010-08-10 15:54:01 +00:00
|
|
|
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("port-" . $port['ifIndex'] . "-dot3.rrd");
|
2011-03-17 13:25:37 +00:00
|
|
|
|
|
|
|
if (is_file($rrd_filename))
|
|
|
|
{
|
|
|
|
foreach ($oids as $oid)
|
|
|
|
{
|
2009-10-28 13:52:39 +00:00
|
|
|
$oid = str_replace("dot3Stats", "", $oid);
|
2011-09-21 11:59:59 +00:00
|
|
|
$oid_ds = 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;
|
2011-09-21 11:59:59 +00:00
|
|
|
$rrd_list[$i]['ds'] = $oid_ds;
|
2009-10-28 13:52:39 +00:00
|
|
|
$i++;
|
|
|
|
}
|
2011-04-09 17:02:51 +00:00
|
|
|
}
|
|
|
|
#} else { echo("file missing: $file"); }
|
2010-02-24 21:44:32 +00:00
|
|
|
|
2009-11-20 00:36:42 +00:00
|
|
|
$colours = "mixed";
|
|
|
|
$nototal = 1;
|
2011-10-25 09:47:45 +00:00
|
|
|
$unit_text = "Errors/sec";
|
2011-10-12 14:04:27 +00:00
|
|
|
$simple_rrd = 1;
|
2009-10-28 13:52:39 +00:00
|
|
|
|
2011-03-17 13:25:37 +00:00
|
|
|
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
2009-10-28 13:52:39 +00:00
|
|
|
|
2011-04-09 17:02:51 +00:00
|
|
|
?>
|