mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
fix: Fix bad Cisco dBm discovery on some IOS versions (#6789)
This commit is contained in:
committed by
Neil Lathwood
parent
1c1ad7a9be
commit
cbe476ad2f
@ -34,13 +34,16 @@ $entitysensor['dBm'] = 'dbm';
|
||||
|
||||
if (is_array($oids)) {
|
||||
foreach ($oids as $index => $entry) {
|
||||
// echo("[" . $entry['entPhySensorType'] . "|" . $entry['entPhySensorValue']. "|" . $index . "]");
|
||||
// Fix for Cisco ASR920, 15.5(2)S
|
||||
if ($entry['entPhySensorType'] == 'other' && str_contains($entity_array[$index]['entPhysicalName'], array('Rx Power Sensor', 'Tx Power Sensor'))) {
|
||||
$entitysensor['other'] = 'dbm';
|
||||
}
|
||||
if ($entitysensor[$entry['entPhySensorType']] && is_numeric($entry['entPhySensorValue']) && is_numeric($index)) {
|
||||
$entPhysicalIndex = $index;
|
||||
$oid = '.1.3.6.1.2.1.99.1.1.1.4.'.$index;
|
||||
$current = $entry['entPhySensorValue'];
|
||||
// ENTITY-SENSOR-MIB::entPhySensorUnitsDisplay.11 = STRING: "C"
|
||||
$descr = $entity_array[$index]['entPhysicalName'];
|
||||
$descr = ucwords($entity_array[$index]['entPhysicalName']);
|
||||
// if ($descr || $device['os'] == "iosxr")
|
||||
if ($descr) {
|
||||
$descr = rewrite_entity_descr($descr);
|
||||
|
Reference in New Issue
Block a user