mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Ciena SAOS 8 device improvements (#12172)
* Ciena SAOS 8 device improvements - improved interface polling for certain devices with broken ifXEntry and long ifEntry value caching - added G.8032 virtual ring status sensors - adjusted default alert threshold for a sensor because some devices provide a nonsensical value (more work to be done here) * Style fixes * missed whitespace Co-authored-by: Tony Murray <murraytony@gmail.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
mib: BRIDGE-MIB:CIENA-SMI:CIENA-CES-CHASSIS-MIB:CIENA-CES-FEATURE-LICENSE-MIB:CIENA-CES-PORT-MIB:CIENA-CES-PORT-XCVR-MIB:WWP-PRODUCTS-MIB:WWP-LEOS-PORT-XCVR-MIB:WWP-LEOS-SYSTEM-CONFIG-MIB
|
||||
mib: BRIDGE-MIB:CIENA-SMI:CIENA-CES-CHASSIS-MIB:CIENA-CES-FEATURE-LICENSE-MIB:CIENA-CES-PORT-MIB:CIENA-CES-PORT-XCVR-MIB:WWP-PRODUCTS-MIB:WWP-LEOS-PORT-XCVR-MIB:WWP-LEOS-SYSTEM-CONFIG-MIB:CIENA-CES-RAPS-MIB
|
||||
modules:
|
||||
os:
|
||||
features: CIENA-CES-MODULE-MIB::cienaCesModuleDescription.1.1
|
||||
@@ -208,7 +208,7 @@ modules:
|
||||
descr: 'Port {{ $cienaCesLogicalPortConfigPortName }} Transceiver Bias Current'
|
||||
entPhysicalIndex: '{{ $dot1dBasePortIfIndex }}'
|
||||
entPhysicalIndex_measured: 'ports'
|
||||
low_limit: cienaCesPortXcvrLowBiasAlarmThreshold
|
||||
low_limit: 0
|
||||
high_limit: cienaCesPortXcvrHighBiasAlarmThreshold
|
||||
divisor: 1000
|
||||
snmp_flags: '-OQUsbe'
|
||||
@@ -492,6 +492,7 @@ modules:
|
||||
- { value: 2, generic: 0, graph: 0, descr: dc }
|
||||
- { value: 3, generic: 1, graph: 0, descr: unequipped }
|
||||
- { value: 99, generic: 3, graph: 0, descr: unknown }
|
||||
skip_values: 99
|
||||
snmp_flags: '-OQUsbe'
|
||||
group: 'Power Supplies'
|
||||
-
|
||||
@@ -863,3 +864,89 @@ modules:
|
||||
- { value: 5, generic: 2, graph: 0, descr: faulted }
|
||||
snmp_flags: '-OQUsbe'
|
||||
group: 'CPU'
|
||||
-
|
||||
oid: cienaCesRapsVirtualRingEntry
|
||||
value: cienaCesRapsVirtualRingState
|
||||
num_oid: '.1.3.6.1.4.1.1271.2.1.20.1.3.1.1.7.{{ $index }}'
|
||||
descr: 'Virtual Ring {{ $cienaCesRapsVirtualRingName }} State'
|
||||
state_name: cienaCesRapsVirtualRingState
|
||||
states:
|
||||
- { value: 1, generic: 3, graph: 0, descr: adminDisabled }
|
||||
- { value: 2, generic: 0, graph: 0, descr: ok }
|
||||
- { value: 3, generic: 2, graph: 0, descr: protecting }
|
||||
- { value: 4, generic: 1, graph: 0, descr: recovering }
|
||||
- { value: 5, generic: 1, graph: 0, descr: init }
|
||||
- { value: 6, generic: 3, graph: 0, descr: none }
|
||||
snmp_flags: '-OQUsbe'
|
||||
group: 'G.8032'
|
||||
-
|
||||
oid: cienaCesRapsVirtualRingEntry
|
||||
value: cienaCesRapsVirtualRingStatus
|
||||
num_oid: '.1.3.6.1.4.1.1271.2.1.20.1.3.1.1.8.{{ $index }}'
|
||||
descr: 'Virtual Ring {{ $cienaCesRapsVirtualRingName }} Status'
|
||||
state_name: cienaCesRapsVirtualRingStatus
|
||||
states:
|
||||
- { value: 1, generic: 0, graph: 0, descr: clear }
|
||||
- { value: 2, generic: 1, graph: 0, descr: localSignalFail }
|
||||
- { value: 3, generic: 1, graph: 0, descr: localForceSwitch }
|
||||
- { value: 4, generic: 1, graph: 0, descr: remoteOrOtherPortSignalFail }
|
||||
- { value: 5, generic: 1, graph: 0, descr: remoteOrOtherPortForceSwitch }
|
||||
- { value: 6, generic: 1, graph: 0, descr: provisioningMismatch }
|
||||
- { value: 7, generic: 1, graph: 0, descr: noRapsPduReceived }
|
||||
- { value: 8, generic: 1, graph: 0, descr: noRplOwnerDetected }
|
||||
snmp_flags: '-OQUsbe'
|
||||
group: 'G.8032'
|
||||
-
|
||||
oid: cienaCesRapsVirtualRingEntry
|
||||
value: cienaCesRapsVirtualRingWestPortState
|
||||
num_oid: '.1.3.6.1.4.1.1271.2.1.20.1.3.1.1.14.{{ $index }}'
|
||||
descr: 'Virtual Ring {{ $cienaCesRapsVirtualRingName }} Port State - West'
|
||||
state_name: cienaCesRapsVirtualRingWestPortState
|
||||
states:
|
||||
- { value: 1, generic: 1, graph: 0, descr: disabled }
|
||||
- { value: 2, generic: 0, graph: 0, descr: forwarding }
|
||||
- { value: 3, generic: 0, graph: 0, descr: blocked }
|
||||
snmp_flags: '-OQUsbe'
|
||||
group: 'G.8032'
|
||||
-
|
||||
oid: cienaCesRapsVirtualRingEntry
|
||||
value: cienaCesRapsVirtualRingEastPortState
|
||||
num_oid: '.1.3.6.1.4.1.1271.2.1.20.1.3.1.1.25.{{ $index }}'
|
||||
descr: 'Virtual Ring {{ $cienaCesRapsVirtualRingName }} Port State - East'
|
||||
state_name: cienaCesRapsVirtualRingEastPortState
|
||||
states:
|
||||
- { value: 1, generic: 1, graph: 0, descr: disabled }
|
||||
- { value: 2, generic: 0, graph: 0, descr: forwarding }
|
||||
- { value: 3, generic: 0, graph: 0, descr: blocked }
|
||||
snmp_flags: '-OQUsbe'
|
||||
group: 'G.8032'
|
||||
-
|
||||
oid: cienaCesRapsVirtualRingEntry
|
||||
value: cienaCesRapsVirtualRingWestPortStatus
|
||||
num_oid: '.1.3.6.1.4.1.1271.2.1.20.1.3.1.1.15.{{ $index }}'
|
||||
descr: 'Virtual Ring {{ $cienaCesRapsVirtualRingName }} Port Status - West'
|
||||
state_name: cienaCesRapsVirtualRingWestPortStatus
|
||||
states:
|
||||
- { value: 1, generic: 0, graph: 0, descr: ok }
|
||||
- { value: 2, generic: 2, graph: 0, descr: down }
|
||||
- { value: 3, generic: 1, graph: 0, descr: ccmFailure }
|
||||
- { value: 4, generic: 0, graph: 0, descr: localForceSwitch }
|
||||
- { value: 5, generic: 0, graph: 0, descr: remoteForceSwitch }
|
||||
- { value: 6, generic: 1, graph: 0, descr: remoteSignalFailure }
|
||||
snmp_flags: '-OQUsbe'
|
||||
group: 'G.8032'
|
||||
-
|
||||
oid: cienaCesRapsVirtualRingEntry
|
||||
value: cienaCesRapsVirtualRingEastPortStatus
|
||||
num_oid: '.1.3.6.1.4.1.1271.2.1.20.1.3.1.1.26.{{ $index }}'
|
||||
descr: 'Virtual Ring {{ $cienaCesRapsVirtualRingName }} Port Status - East'
|
||||
state_name: cienaCesRapsVirtualRingEastPortStatus
|
||||
states:
|
||||
- { value: 1, generic: 0, graph: 0, descr: ok }
|
||||
- { value: 2, generic: 2, graph: 0, descr: down }
|
||||
- { value: 3, generic: 1, graph: 0, descr: ccmFailure }
|
||||
- { value: 4, generic: 0, graph: 0, descr: localForceSwitch }
|
||||
- { value: 5, generic: 0, graph: 0, descr: remoteForceSwitch }
|
||||
- { value: 6, generic: 1, graph: 0, descr: remoteSignalFailure }
|
||||
snmp_flags: '-OQUsbe'
|
||||
group: 'G.8032'
|
||||
|
56
includes/polling/ports/os/ciena-sds.inc.php
Normal file
56
includes/polling/ports/os/ciena-sds.inc.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
/**
|
||||
* ciena-sds.inc.php
|
||||
*
|
||||
* LibreNMS Ciena port poller include
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @link http://librenms.org
|
||||
* @copyright 2020 Dan Baker, Lancaster-Lebanon IU13
|
||||
*/
|
||||
|
||||
// These hardware platforms either have a broken IF-MIB or have excessively long caching of values
|
||||
$bad_HC_counter_devices = [
|
||||
'170-5170-905',
|
||||
'154-8700-930',
|
||||
];
|
||||
|
||||
if (in_array($device['hardware'], $bad_HC_counter_devices)) {
|
||||
$ciena_pm = snmpwalk_cache_oid($device, 'cienaCesPmExtendedTxRxStatisticsBinEntry', [], 'CIENA-CES-PM');
|
||||
|
||||
d_echo($ciena_pm);
|
||||
|
||||
foreach ($ciena_pm as $index => $ciena_pm_entry) {
|
||||
// PM interface indices are different than regular interface indices.
|
||||
// PM index for port 1/1 -- 1000001
|
||||
// if index for port 1/1 -- 100001
|
||||
|
||||
$nms_index = $index - 900000;
|
||||
|
||||
if (isset($port_stats[$nms_index])) {
|
||||
$port_stats[$nms_index]['ifHCInOctets'] = $ciena_pm_entry['cienaCesPmExtendedTxRxStatsBinRxBytes'];
|
||||
$port_stats[$nms_index]['ifHCInUcastPkts'] = $ciena_pm_entry['cienaCesPmExtendedTxRxStatsBinRxPkts'];
|
||||
$port_stats[$nms_index]['ifHCInMulticastPkts'] = $ciena_pm_entry['cienaCesPmExtendedTxRxStatsBinRxMcastPkts'];
|
||||
$port_stats[$nms_index]['ifHCInBroadcastPkts'] = $ciena_pm_entry['cienaCesPmExtendedTxRxStatsBinRxBcastPkts'];
|
||||
$port_stats[$nms_index]['ifHCOutOctets'] = $ciena_pm_entry['cienaCesPmExtendedTxRxStatsBinTxBytes'];
|
||||
$port_stats[$nms_index]['ifHCOutUcastPkts'] = $ciena_pm_entry['cienaCesPmExtendedTxRxStatsBinTxPkts'];
|
||||
$port_stats[$nms_index]['ifHCOutMulticastPkts'] = $ciena_pm_entry['cienaCesPmExtendedTxRxStatsBinTxMcastPkts'];
|
||||
$port_stats[$nms_index]['ifHCOutBroadcastPkts'] = $ciena_pm_entry['cienaCesPmExtendedTxRxStatsBinTxBcastPkts'];
|
||||
$port_stats[$nms_index]['ifInErrors'] = $ciena_pm_entry['cienaCesPmExtendedTxRxStatsBinRxCrcErrorPkts'];
|
||||
$port_stats[$nms_index]['ifOutErrors'] = $ciena_pm_entry['cienaCesPmExtendedTxRxStatsBinTxCrcErrorPkts'];
|
||||
$port_stats[$nms_index]['ifInDiscards'] = $ciena_pm_entry['cienaCesPmExtendedTxRxStatsBinInDiscards'];
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user