mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
add cef switching graphs and un-retard sensors polling
git-svn-id: http://www.observium.org/svn/observer/trunk@2079 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
if (is_numeric($id))
|
||||
{
|
||||
$query = mysql_query("SELECT * FROM `cef_switching` AS C, `devices` AS D WHERE C.cef_switching_id = '".$id."' AND C.device_id = D.device_id");
|
||||
$cef = mysql_fetch_assoc($query);
|
||||
|
||||
if (is_numeric($cef['device_id']) && ($config['allow_unauth_graphs'] || device_permitted($cef['device_id'])))
|
||||
{
|
||||
$device = device_by_id_cache($cef['device_id']);
|
||||
|
||||
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename("cefswitching-".$cef['entPhysicalIndex']."-".$cef['afi']."-".$cef['cef_index'].".rrd");
|
||||
|
||||
$title = generate_device_link($device);
|
||||
$title .= " :: CEF Switching :: " . htmlentities($cef['cef_descr']);
|
||||
$auth = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
## Cycle through dot3stats OIDs and build list of RRAs to pass to multi simplex grapher
|
||||
|
||||
$oids = array('drop', 'punt', 'hostpunt');
|
||||
$i = 0;
|
||||
|
||||
if (is_file($rrd_filename))
|
||||
{
|
||||
foreach ($oids as $oid)
|
||||
{
|
||||
$oid = str_replace("dot3Stats", "", $oid);
|
||||
$oid_rra = truncate($oid, 19, '');
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = $oid;
|
||||
$rrd_list[$i]['rra'] = $oid_rra;
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
#} else { echo("file missing: $file"); }
|
||||
|
||||
$colours = "mixed";
|
||||
$nototal = 1;
|
||||
$unit_text = "Errors";
|
||||
|
||||
include("includes/graphs/generic_multi_simplex_seperated.inc.php");
|
||||
|
||||
?>
|
||||
@@ -3,28 +3,28 @@
|
||||
# FIXME uhh..
|
||||
if (1)
|
||||
{
|
||||
$rrd_list[1]['filename'] = $config['rrd_dir'] . "/" . $device['hostname'] . "/port-" . safename($port['ifIndex'] . ".rrd");
|
||||
$rrd_list[1]['descr'] = $int['ifDescr'];
|
||||
$rrd_list[1]['rra_in'] = "INNUCASTPKTS";
|
||||
$rrd_list[1]['rra_out'] = "OUTNUCASTPKTS";
|
||||
$rrd_list[1]['descr'] = "NonUnicast";
|
||||
$rrd_list[1]['colour_area_in'] = "BB77BB";
|
||||
$rrd_list[1]['colour_area_out'] = "FFDD88";
|
||||
# $rrd_list[1]['filename'] = $config['rrd_dir'] . "/" . $device['hostname'] . "/port-" . safename($port['ifIndex'] . ".rrd");
|
||||
# $rrd_list[1]['descr'] = $int['ifDescr'];
|
||||
# $rrd_list[1]['rra_in'] = "INNUCASTPKTS";
|
||||
# $rrd_list[1]['rra_out'] = "OUTNUCASTPKTS";
|
||||
# $rrd_list[1]['descr'] = "NonUnicast";
|
||||
# $rrd_list[1]['colour_area_in'] = "BB77BB";
|
||||
# $rrd_list[1]['colour_area_out'] = "FFDD88";
|
||||
|
||||
$rrd_list[2]['filename'] = $config['rrd_dir'] . "/" . $device['hostname'] . "/port-" . safename($port['ifIndex'] . ".rrd");
|
||||
$rrd_list[2]['descr'] = $int['ifDescr'];
|
||||
$rrd_list[2]['rra_in'] = "INBROADCASTPKTS";
|
||||
$rrd_list[2]['rra_out'] = "OUTBROADCASTPKTS";
|
||||
$rrd_list[2]['descr'] = "Broadcast";
|
||||
$rrd_list[2]['colour_area_in'] = "aa77BB";
|
||||
$rrd_list[2]['colour_area_out'] = "eeDD88";
|
||||
$rrd_list[2]['colour_area_in'] = "aa37BB";
|
||||
$rrd_list[2]['colour_area_out'] = "ee9D88";
|
||||
|
||||
$rrd_list[4]['filename'] = $config['rrd_dir'] . "/" . $device['hostname'] . "/port-" . safename($port['ifIndex'] . ".rrd");
|
||||
$rrd_list[4]['descr'] = $int['ifDescr'];
|
||||
$rrd_list[4]['rra_in'] = "INMULTICASTPKTS";
|
||||
$rrd_list[4]['rra_out'] = "OUTMULTICASTPKTS";
|
||||
$rrd_list[4]['descr'] = "Multicast";
|
||||
$rrd_list[4]['colour_area_in'] = "805080";
|
||||
$rrd_list[4]['colour_area_in'] = "905090";
|
||||
$rrd_list[4]['colour_area_out'] = "c0a060";
|
||||
|
||||
$units='';
|
||||
@@ -60,4 +60,4 @@ elseif (is_file($config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename(
|
||||
include("includes/graphs/generic_duplex.inc.php");
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user