mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Implements the CISCO-OTV-MIB to retrieve OTV counters from Cisco devices. This collects information on the configured Overlays and Adjacencies Statistics are collected for the amount of VLAN's on each overlay and the amount of MAC addresses available over each OTV endpoint. OTV alerts are collected and generated if the appropriate alerting rules exist. Data is displayed under routing at both the global and device level. Includes function snmpwalk_array_num, which performs a numeric SNMPWalk and returns an array containing $count indexes One Index: From: 1.3.6.1.4.1.9.9.166.1.15.1.1.27.18.655360 = 0 To: $array['1.3.6.1.4.1.9.9.166.1.15.1.1.27.18']['655360'] = 0 Two Indexes: From: 1.3.6.1.4.1.9.9.166.1.15.1.1.27.18.655360 = 0 To: $array['1.3.6.1.4.1.9.9.166.1.15.1.1.27']['18']['655360'] = 0 And so on...
85 lines
2.2 KiB
PHP
85 lines
2.2 KiB
PHP
<?php
|
|
|
|
$link_array = array(
|
|
'page' => 'device',
|
|
'device' => $device['device_id'],
|
|
'tab' => 'routing',
|
|
);
|
|
|
|
// $type_text['overview'] = "Overview";
|
|
$type_text['ipsec_tunnels'] = 'IPSEC Tunnels';
|
|
|
|
// Cisco ACE
|
|
$type_text['loadbalancer_rservers'] = 'Rservers';
|
|
$type_text['loadbalancer_vservers'] = 'Serverfarms';
|
|
|
|
// Citrix Netscaler
|
|
$type_text['netscaler_vsvr'] = 'VServers';
|
|
|
|
$type_text['bgp'] = 'BGP';
|
|
$type_text['cef'] = 'CEF';
|
|
$type_text['ospf'] = 'OSPF';
|
|
$type_text['vrf'] = 'VRFs';
|
|
$type_text['cisco-otv'] = 'OTV';
|
|
|
|
print_optionbar_start();
|
|
|
|
$pagetitle[] = 'Routing';
|
|
|
|
echo "<span style='font-weight: bold;'>Routing</span> » ";
|
|
|
|
unset($sep);
|
|
foreach ($routing_tabs as $type) {
|
|
if (!$vars['proto']) {
|
|
$vars['proto'] = $type;
|
|
}
|
|
|
|
echo $sep;
|
|
|
|
if ($vars['proto'] == $type) {
|
|
echo '<span class="pagemenu-selected">';
|
|
}
|
|
|
|
echo generate_link($type_text[$type].' ('.$device_routing_count[$type].')', $link_array, array('proto' => $type));
|
|
if ($vars['proto'] == $type) {
|
|
echo '</span>';
|
|
}
|
|
|
|
$sep = ' | ';
|
|
}
|
|
|
|
print_optionbar_end();
|
|
|
|
if (is_file('pages/device/routing/'.mres($vars['proto']).'.inc.php')) {
|
|
include 'pages/device/routing/'.mres($vars['proto']).'.inc.php';
|
|
}
|
|
else {
|
|
foreach ($routing_tabs as $type) {
|
|
if ($type != 'overview') {
|
|
if (is_file('pages/device/routing/overview/'.mres($type).'.inc.php')) {
|
|
$g_i++;
|
|
if (!is_integer($g_i / 2)) {
|
|
$row_colour = $list_colour_a;
|
|
}
|
|
else {
|
|
$row_colour = $list_colour_b;
|
|
}
|
|
|
|
echo '<div style="background-color: '.$row_colour.';">';
|
|
echo '<div style="padding:4px 0px 0px 8px;"><span class=graphhead>'.$type_text[$type].'</span>';
|
|
|
|
include 'pages/device/routing/overview/'.mres($type).'.inc.php';
|
|
|
|
echo '</div>';
|
|
echo '</div>';
|
|
}
|
|
else {
|
|
$graph_title = $type_text[$type];
|
|
$graph_type = 'device_'.$type;
|
|
|
|
include 'includes/print-device-graph.php';
|
|
}//end if
|
|
}//end if
|
|
}//end foreach
|
|
}//end if
|