mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
newdevice: Add Cisco ASR, Nexus, etc. PSU State sensor (#6790)
This commit is contained in:
committed by
Neil Lathwood
parent
cbe476ad2f
commit
d5dd5c2da5
@@ -15,6 +15,7 @@ $tables = array(
|
||||
array('ciscoEnvMonTemperatureStatusTable','.1.3.6.1.4.1.9.9.13.1.3.1.6.','ciscoEnvMonTemperatureState','ciscoEnvMonTemperatureStatusDescr', 'CISCO-ENVMON-MIB') ,
|
||||
array('ciscoEnvMonFanStatusTable','.1.3.6.1.4.1.9.9.13.1.4.1.3.','ciscoEnvMonFanState','ciscoEnvMonFanStatusDescr', 'CISCO-ENVMON-MIB') ,
|
||||
array('ciscoEnvMonSupplyStatusTable','.1.3.6.1.4.1.9.9.13.1.5.1.3.','ciscoEnvMonSupplyState','ciscoEnvMonSupplyStatusDescr', 'CISCO-ENVMON-MIB') ,
|
||||
array('cefcFRUPowerStatusTable','.1.3.6.1.4.1.9.9.117.1.1.2.1.2.','cefcFRUPowerOperStatus','Sensor Name', 'CISCO-ENTITY-FRU-CONTROL-MIB') ,
|
||||
array('cswGlobals','.1.3.6.1.4.1.9.9.500.1.1.3.','cswRingRedundant','Stack Ring - Redundant', 'CISCO-STACKWISE-MIB') ,
|
||||
array('cswSwitchRole','.1.3.6.1.4.1.9.9.500.1.2.1.1.3.','cswSwitchRole','Stack Role - Switch#', 'CISCO-STACKWISE-MIB') ,
|
||||
array('cswSwitchState','.1.3.6.1.4.1.9.9.500.1.2.1.1.6.','cswSwitchState','Stack State - Switch#', 'CISCO-STACKWISE-MIB') ,
|
||||
@@ -95,6 +96,21 @@ foreach ($tables as $tablevalue) {
|
||||
array($state_index_id,'invalid',0,10,2) ,
|
||||
array($state_index_id,'removed',0,11,1)
|
||||
);
|
||||
} elseif ($state_name == 'cefcFRUPowerOperStatus') {
|
||||
$states = array(
|
||||
array($state_index_id,'off (other)',0,1,2) ,
|
||||
array($state_index_id,'on',0,2,0) ,
|
||||
array($state_index_id,'off (admin)',0,3,1) ,
|
||||
array($state_index_id,'off (denied)',0,4,2) ,
|
||||
array($state_index_id,'off (environmental)',0,5,2) ,
|
||||
array($state_index_id,'off (temperature)',0,6,2) ,
|
||||
array($state_index_id,'off (fan)',0,7,2) ,
|
||||
array($state_index_id,'failed',0,8,2) ,
|
||||
array($state_index_id,'on (fan failed)',0,9,1) ,
|
||||
array($state_index_id,'off (cooling)',0,10,2) ,
|
||||
array($state_index_id,'off (connector rating)',0,11,2) ,
|
||||
array($state_index_id,'on (no inline power)',0,12,1)
|
||||
);
|
||||
} else {
|
||||
$states = array(
|
||||
array($state_index_id,'normal',0,1,0) ,
|
||||
@@ -132,6 +148,8 @@ foreach ($tables as $tablevalue) {
|
||||
} elseif ($state_name == 'cswStackPortOperStatus') {
|
||||
$stack_port_descr = get_port_by_index_cache($device, $index);
|
||||
$descr = $tablevalue[3] . $stack_port_descr['ifDescr'];
|
||||
} elseif ($state_name == 'cefcFRUPowerOperStatus') {
|
||||
$descr = snmp_get($device, 'entPhysicalName.'.$index, '-Oqv', 'ENTITY-MIB');
|
||||
}
|
||||
discover_sensor($valid['sensor'], 'state', $device, $cur_oid.$index, $index, $state_name, $descr, '1', '1', null, null, null, null, $temp[$index][$tablevalue[2]], 'snmp', $index);
|
||||
|
||||
|
Reference in New Issue
Block a user