mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
poll q-bridge-mib for port VLAN, also fix links on device vlan tab
git-svn-id: http://www.observium.org/svn/observer/trunk@2593 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -16,7 +16,7 @@ foreach (dbFetchRows("SELECT * FROM ports WHERE `device_id` = ? AND `ifVlan` = ?
|
|||||||
|
|
||||||
echo("<div style='display: block; padding: 2px; margin: 2px; min-width: 139px; max-width:139px; min-height:85px; max-height:85px; text-align: center; float: left; background-color: ".$list_colour_b_b.";'>
|
echo("<div style='display: block; padding: 2px; margin: 2px; min-width: 139px; max-width:139px; min-height:85px; max-height:85px; text-align: center; float: left; background-color: ".$list_colour_b_b.";'>
|
||||||
<div style='font-weight: bold;'>".makeshortif($port['ifDescr'])."</div>
|
<div style='font-weight: bold;'>".makeshortif($port['ifDescr'])."</div>
|
||||||
<a href='device/".$device['device_id']."/port/".$port['interface_id']."/' onmouseover=\"return overlib('\
|
<a href='device/device=".$device['device_id']."/tab=port/port=".$port['interface_id']."/' onmouseover=\"return overlib('\
|
||||||
<div style=\'font-size: 16px; padding:5px; font-weight: bold; color: #e5e5e5;\'>".$device['hostname']." - ".$port['ifDescr']."</div>\
|
<div style=\'font-size: 16px; padding:5px; font-weight: bold; color: #e5e5e5;\'>".$device['hostname']." - ".$port['ifDescr']."</div>\
|
||||||
".$port['ifAlias']." \
|
".$port['ifAlias']." \
|
||||||
<img src=\'graph.php?type=$graph_type&if=".$port['interface_id']."&from=-2day&to=".$now."&width=450&height=150\'>\
|
<img src=\'graph.php?type=$graph_type&if=".$port['interface_id']."&from=-2day&to=".$now."&width=450&height=150\'>\
|
||||||
|
@@ -90,6 +90,8 @@ if ($device['os_group'] == "ios")
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$port_stats = snmpwalk_cache_oid($device, "dot1qPortVlanTable", $port_stats, "Q-BRIDGE-MIB");
|
||||||
|
|
||||||
$polled = time();
|
$polled = time();
|
||||||
|
|
||||||
/// End Building SNMP Cache Array
|
/// End Building SNMP Cache Array
|
||||||
@@ -192,12 +194,17 @@ foreach ($ports as $port)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Set VLAN and Trunk
|
/// Set VLAN and Trunk
|
||||||
if(isset($this_port['vlanTrunkPortEncapsulationOperType']) && $this_port['vlanTrunkPortEncapsulationOperType'] != "notApplicable")
|
if (isset($this_port['vlanTrunkPortEncapsulationOperType']) && $this_port['vlanTrunkPortEncapsulationOperType'] != "notApplicable")
|
||||||
{
|
{
|
||||||
$this_port['ifTrunk'] = $this_port['vlanTrunkPortEncapsulationOperType'];
|
$this_port['ifTrunk'] = $this_port['vlanTrunkPortEncapsulationOperType'];
|
||||||
}
|
}
|
||||||
$this_port['ifVlan'] = $this_port['vmVlan'];
|
$this_port['ifVlan'] = $this_port['vmVlan'];
|
||||||
if(isset($this_port['vlanTrunkPortNativeVlan'])) { $this_port['ifVlan'] = $this_port['vlanTrunkPortNativeVlan']; }
|
if(isset($this_port['vlanTrunkPortNativeVlan'])) { $this_port['ifVlan'] = $this_port['vlanTrunkPortNativeVlan']; }
|
||||||
|
|
||||||
|
if (isset($this_port['dot1qPvid']))
|
||||||
|
{
|
||||||
|
$this_port['ifVlan'] = $this_port['dot1qPvid'];
|
||||||
|
}
|
||||||
|
|
||||||
/// Update IF-MIB data
|
/// Update IF-MIB data
|
||||||
foreach ($data_oids as $oid)
|
foreach ($data_oids as $oid)
|
||||||
|
Reference in New Issue
Block a user