mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
feature: Added Cisco Stackwise Support #4301
feature: Added Cisco Stackwise Support #4301
This commit is contained in:
committed by
Neil Lathwood
parent
1110de3ab3
commit
28db97382e
@@ -16,6 +16,10 @@ if ($device['os_group'] == 'cisco') {
|
||||
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('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') ,
|
||||
array('cswStackPortOperStatus','.1.3.6.1.4.1.9.9.500.1.2.2.1.1.','cswStackPortOperStatus','Stack Port Status - ', 'CISCO-STACKWISE-MIB') ,
|
||||
array('cRFCfgRedundancyOperMode','.1.3.6.1.4.1.9.9.176.1.2.14.','cRFCfgRedundancyOperMode','VSS Mode', 'CISCO-RF-MIB') ,
|
||||
array('cRFStatusUnitState','.1.3.6.1.4.1.9.9.176.1.1.2.','cRFStatusUnitState','VSS Device State', 'CISCO-RF-MIB') ,
|
||||
array('cRFStatusPeerUnitState','.1.3.6.1.4.1.9.9.176.1.1.4.','cRFStatusPeerUnitState','VSS Peer State', 'CISCO-RF-MIB')
|
||||
@@ -26,7 +30,7 @@ if ($device['os_group'] == 'cisco') {
|
||||
$cur_oid = $tablevalue[1];
|
||||
|
||||
if (is_array($temp)) {
|
||||
if ($temp[0][$tablevalue[2]] == 'nonRedundant') {
|
||||
if ($temp[0][$tablevalue[2]] == 'nonRedundant' || $temp[0]['cswMaxSwitchNum'] == '1') {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -66,6 +70,32 @@ if ($device['os_group'] == 'cisco') {
|
||||
array($state_index_id,'warmStandbyRedundant',0,7,0) ,
|
||||
array($state_index_id,'hotStandbyRedundant',0,8,0)
|
||||
);
|
||||
} elseif ($state_name == 'cswRingRedundant') {
|
||||
$states = array(
|
||||
array($state_index_id,'true',0,1,0) ,
|
||||
array($state_index_id,'false',0,2,2)
|
||||
);
|
||||
} elseif ($state_name == 'cswSwitchRole') {
|
||||
$states = array(
|
||||
array($state_index_id,'master',0,1,0) ,
|
||||
array($state_index_id,'member',0,2,0) ,
|
||||
array($state_index_id,'notMember',0,3,0) ,
|
||||
array($state_index_id,'standby',0,4,0)
|
||||
);
|
||||
} elseif ($state_name == 'cswSwitchState') {
|
||||
$states = array(
|
||||
array($state_index_id,'waiting',0,1,1) ,
|
||||
array($state_index_id,'progressing',0,2,1) ,
|
||||
array($state_index_id,'added',0,3,1) ,
|
||||
array($state_index_id,'ready',0,4,0) ,
|
||||
array($state_index_id,'sdmMismatch',0,5,2) ,
|
||||
array($state_index_id,'verMismatch',0,6,2) ,
|
||||
array($state_index_id,'featureMismatch',0,7,2) ,
|
||||
array($state_index_id,'newMasterInit',0,8,2) ,
|
||||
array($state_index_id,'provisioned',0,9,1) ,
|
||||
array($state_index_id,'invalid',0,10,2) ,
|
||||
array($state_index_id,'removed',0,11,1)
|
||||
);
|
||||
} else {
|
||||
$states = array(
|
||||
array($state_index_id,'normal',0,1,0) ,
|
||||
@@ -92,8 +122,17 @@ if ($device['os_group'] == 'cisco') {
|
||||
foreach ($temp as $index => $entry) {
|
||||
//Discover Sensors
|
||||
$descr = ucwords($temp[$index][$tablevalue[3]]);
|
||||
if ($state_name == 'cRFStatusUnitState' || $state_name == 'cRFStatusPeerUnitState' || $state_name == 'cRFCfgRedundancyOperMode') {
|
||||
if ($state_name == 'cRFStatusUnitState' || $state_name == 'cRFStatusPeerUnitState' || $state_name == 'cRFCfgRedundancyOperMode' || $state_name == 'cswRingRedundant') {
|
||||
$descr = $tablevalue[3];
|
||||
} elseif ($state_name == 'cswSwitchRole') {
|
||||
$swrolenumber++;
|
||||
$descr = $tablevalue[3] . $swrolenumber;
|
||||
} elseif ($state_name == 'cswSwitchState') {
|
||||
$swstatenumber++;
|
||||
$descr = $tablevalue[3] . $swstatenumber;
|
||||
} elseif ($state_name == 'cswStackPortOperStatus') {
|
||||
$stack_port_descr = get_port_by_index_cache($device, $index);
|
||||
$descr = $tablevalue[3] . $stack_port_descr['ifDescr'];
|
||||
}
|
||||
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);
|
||||
|
||||
|
1842
mibs/CISCO-STACKWISE-MIB
Normal file
1842
mibs/CISCO-STACKWISE-MIB
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user