mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Improved port polling in certain scenarios (#9082)
* Improved port polling in certain scenarios * Update ports.inc.php * Update ports.inc.php * Remove temporary variables
This commit is contained in:
committed by
Tony Murray
parent
7ebd6dbe5b
commit
23b46c7681
@@ -212,6 +212,7 @@ if ($device['os'] === 'f5' && (version_compare($device['version'], '11.2.0', '>=
|
||||
$walk_base = $total_port_count - $polled_port_count < 5 || $polled_port_count / $total_port_count > 0.9 ;
|
||||
|
||||
if ($walk_base) {
|
||||
echo "Not enough ports for selected port polling, walking base OIDs instead\n";
|
||||
foreach ($table_base_oids as $oid) {
|
||||
$port_stats = snmpwalk_cache_oid($device, $oid, $port_stats, 'IF-MIB');
|
||||
}
|
||||
@@ -251,6 +252,10 @@ if ($device['os'] === 'f5' && (version_compare($device['version'], '11.2.0', '>=
|
||||
|
||||
$port_stats = snmp_get_multi($device, $oids, '-OQUst', 'IF-MIB', null, $port_stats);
|
||||
$port_stats = snmp_get_multi($device, $extra_oids, '-OQUst', 'EtherLike-MIB', null, $port_stats);
|
||||
|
||||
if ($device['os'] != 'asa') {
|
||||
$port_stats = snmp_get_multi($device, "dot1qPvid.$ifIndex", '-OQUst', 'Q-BRIDGE-MIB', null, $port_stats);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -281,6 +286,7 @@ if ($device['os'] === 'f5' && (version_compare($device['version'], '11.2.0', '>=
|
||||
$port_stats = snmpwalk_cache_oid($device, 'dot3StatsIndex', $port_stats, 'EtherLike-MIB');
|
||||
}
|
||||
$port_stats = snmpwalk_cache_oid($device, 'dot3StatsDuplexStatus', $port_stats, 'EtherLike-MIB');
|
||||
$port_stats = snmpwalk_cache_oid($device, 'dot1qPvid', $port_stats, 'Q-BRIDGE-MIB');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -375,8 +381,6 @@ if ($device['os_group'] == 'cisco' && $device['os'] != 'asa') {
|
||||
$port_stats = snmpwalk_cache_oid($device, 'vmVlan', $port_stats, 'CISCO-VLAN-MEMBERSHIP-MIB');
|
||||
$port_stats = snmpwalk_cache_oid($device, 'vlanTrunkPortEncapsulationOperType', $port_stats, 'CISCO-VTP-MIB');
|
||||
$port_stats = snmpwalk_cache_oid($device, 'vlanTrunkPortNativeVlan', $port_stats, 'CISCO-VTP-MIB');
|
||||
} elseif ($device['os'] != 'asa') {
|
||||
$port_stats = snmpwalk_cache_oid($device, 'dot1qPvid', $port_stats, 'Q-BRIDGE-MIB');
|
||||
}//end if
|
||||
|
||||
$polled = time();
|
||||
|
Reference in New Issue
Block a user