mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix the detection of NX-OS fan names
This commit is contained in:
@ -22,15 +22,14 @@ if ($device['os'] == 'nxos') {
|
||||
*/
|
||||
|
||||
if (is_array($fan_trays)) {
|
||||
$entity_oid = '.1.3.6.1.2.1.47.1.1.1.1.7';
|
||||
$entities = snmpwalk_cache_oid_num($device, $entity_oid, array());
|
||||
|
||||
foreach ($fan_trays as $oid => $array) {
|
||||
$state = current($array);
|
||||
$split_oid = explode('.', $oid);
|
||||
$index = $split_oid[(count($split_oid) - 1)];
|
||||
$current_oid = "$fan_tray_oid.$index";
|
||||
$descr = current($entities["$entity_oid.$index"]);
|
||||
|
||||
$entity_oid = '.1.3.6.1.2.1.47.1.1.1.1.7';
|
||||
$descr = trim(snmp_get($device, "$entity_oid.$index", '-Ovq'), '"');
|
||||
|
||||
$state_name = "cefcFanTrayOperStatus";
|
||||
$state_index_id = create_state_index($state_name);
|
||||
|
Reference in New Issue
Block a user