only try per-vlan community on cisco :)

git-svn-id: http://www.observium.org/svn/observer/trunk@2838 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2012-01-19 10:04:06 +00:00
parent 8cecfb8f77
commit f2d7f81a62

View File

@@ -17,10 +17,12 @@ foreach($this_vlans as $vlan)
if($vlan <1002 || $vlan > 1105) /// Ignore reserved VLAN IDs
{
$vlan_device = array_merge($device, array('community' => $device['community']."@".$vlan));
$vlan_data = snmpwalk_cache_oid($vlan_device, "dot1dStpPortEntry", array(), "BRIDGE-MIB:Q-BRIDGE-MIB");
$vlan_data = snmpwalk_cache_oid($vlan_device, "dot1dBasePortEntry", $vlan_data, "BRIDGE-MIB:Q-BRIDGE-MIB");
if($device['os_group'] == "cisco")
{
$vlan_device = array_merge($device, array('community' => $device['community']."@".$vlan));
$vlan_data = snmpwalk_cache_oid($vlan_device, "dot1dStpPortEntry", array(), "BRIDGE-MIB:Q-BRIDGE-MIB");
$vlan_data = snmpwalk_cache_oid($vlan_device, "dot1dBasePortEntry", $vlan_data, "BRIDGE-MIB:Q-BRIDGE-MIB");
}
echo("VLAN $vlan \n");
@@ -58,6 +60,9 @@ foreach($this_vlans as $vlan)
}
}
unset($vlan_data);
}