centreon-plugins icon indicating copy to clipboard operation
centreon-plugins copied to clipboard

Nortel stack shows OK when switches are down in a stack.

Open dajones70 opened this issue 2 years ago • 8 comments

Nortel stack check shows all switches in the stack as OK when the configured count is actually higher than the count found when a switch is offline.

'/usr/lib64/nagios/plugins/centreon-plugins/centreon_plugins.pl' '--plugin' 'network::nortel::standard::snmp::plugin' '--mode' 'stack' '--hostname' '10.xx.xx.20' '--snmp-community' '*******' '--snmp-port' '161' '--snmp-version' '2' '--change-exit=unknown=critical'

OK: Number of units: 6 - All stack units are ok | 'stack.units.count'=6;;;0; '19KH4960T246#stack.unit.detected.seconds'=158s;;;0; '19KH4960T268#stack.unit.detected.seconds'=158s;;;0; '19KH4960T528#stack.unit.detected.seconds'=158s;;;0; '19KH4960T571#stack.unit.detected.seconds'=158s;;;0; '19KH4960T667#stack.unit.detected.seconds'=158s;;;0; '20KH0550T060#stack.unit.detected.seconds'=158s;;;0;

snmpwalk -v2c -c ******* 10.xx.xx.20 .1.3.6.1.4.1.45.1.6.3.3.1.1.6.8

SNMPv2-SMI::enterprises.45.1.6.3.3.1.1.6.8.1.0 = STRING: "4950GTS-PWR+ HW:24" SNMPv2-SMI::enterprises.45.1.6.3.3.1.1.6.8.3.0 = STRING: "4950GTS-PWR+ HW:23" SNMPv2-SMI::enterprises.45.1.6.3.3.1.1.6.8.4.0 = STRING: "4950GTS-PWR+ HW:23" SNMPv2-SMI::enterprises.45.1.6.3.3.1.1.6.8.5.0 = STRING: "4950GTS-PWR+ HW:23" SNMPv2-SMI::enterprises.45.1.6.3.3.1.1.6.8.6.0 = STRING: "4950GTS-PWR+ HW:23" SNMPv2-SMI::enterprises.45.1.6.3.3.1.1.6.8.7.0 = STRING: "4950GTS-PWR+ HW:23"

snmpwalk -v2c -c ******* 10.xx.xx.20 .1.3.6.1.4.1.45.5.13.1.1.1.0

SNMPv2-SMI::enterprises.45.5.13.1.1.1.0 = INTEGER: 7

The SNMP output shows 6 units but the configured stack count is 7. One switch in the stack is down but the plugin says OK.

Switch logs/syslog show: SNMP:Trap: bsnStackConfigurationError - Number of stack units is 6 instead of expected 7

dajones70 avatar Nov 06 '23 13:11 dajones70

Anything I can do to help with this? I am OK (not great) with Perl and I don't really understand/follow all of the Perl classes and inheritance (I hope that is the right term) used by the Centreon plugins to help by providing a pull request.

dajones70 avatar Nov 13 '23 14:11 dajones70

Hi, can you provide the result of the following command in a file joined attached to this conversation?

snmpwalk -ObenTU -v 2c -c ******* 10.xx.xx.20 .1.3.6.1.4.1

omercier avatar Nov 20 '23 08:11 omercier

See attached.

snmp.txt

dajones70 avatar Nov 20 '23 18:11 dajones70

Hi, for the moment the OID that gives the number of elements in the stack is not used by the plugin, but in the meantime, you can add the --warning-units-total/--critical-units-total options no raise an alert when the number of elements differs from the expected value. E.g. --critical-units-total=7:7 will return a CRITICAL state when the value is different from 7.

omercier avatar Nov 27 '23 08:11 omercier

We have over 500 stacks so this recommendataion would not be practical to implement. The plugin should pull the configured count dynamically and show a CRITICAL if the active count is less than that number and WARNING if it's more than that number (incorrectly configured stack count). This fundamental logic issue should be considered a bug. If this is not going to be fixed, then I will have no other choice than to write my own plugin script to handle this properly.

dajones70 avatar Nov 27 '23 11:11 dajones70

If I were a Perl programmer, I would be glad to help with a pull request but I can't follow the object oritented code. If it were written in any other language, I could help.

dajones70 avatar Dec 01 '23 12:12 dajones70

What would it take for someone to work/fix this issue? Are enhancements paid for to get a higher priority?

dajones70 avatar Jan 02 '24 20:01 dajones70

Anyone? Anyone? Bueller?

dajones70 avatar Jan 23 '24 13:01 dajones70

Hello :)

First, sorry for response time. This issue had been classed as enhancement because the workaround proposed by @omercier should handle the issue while an enhancement development can be started. Unfortunately the enhancements request aren't handle in github anymore, please address it here to be take into account and vote on (you can link this github issue in your idea proposition). Thank you for your understanding.

lucie-tirand avatar Jul 02 '24 12:07 lucie-tirand