Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
Check the status of a Cisco Catalyst 3750,3650,3850 stack via SNMP
Current Version
1.3.3
Last Release Date
2016-02-18
Owner
Andrea Gabellini
Website
http://www.telecomitalia.sm
Compatible With
This perl script checks via SNMP the status of a Cisco Catalyst 3750,3650,3850 stack. It needs the Net::SNMP module available from CPAN.
**NOTE 1:** The plugin needs IOS 12.2(25)SEE or greater that include the support for the CISCO-STACKWISE-MIB.
**NOTE 2:** There is a bug (CSCsg18188) in IOS below 12.2(35)SE. Cisco recommends to not poll these mibs. (Thanks to Terry Truebenbach).
**NOTE 3:** There is a bug (CSCse53528) in IOS below 12.2(35)SE. cswRingRedundant returns false for stack of cat 3750-48TS/3750-24TS correctly configured in redundant format. (Thanks to Rolf Wiebel).
20160216: Release 1.3.3 * Added 'removed' state. Thanks to Paulisse85 and srdjanb
20140224: Release 1.3.2 * Changed the logic to get the oid to support other switches other than 3750 (Thanks to Marco Gruber)
20130308: Release 1.3.1 * Modified by Onlight, Inc. <[email protected]>
20071018: Release 1.2.1 * Remove critical status for provisioned switch.
20070621: Release 1.2 * Added a validation for the stack ring speed. If a stack port goes down on any stack member, the speed goes from Full to Half which will put the plugin in a WARNING state (Thanks to Martin Tremblay). * Added a debug switch (-D). * Added an alarm switch (-A) to simulate an alarm without the need to break the stack.
20070227: First release 1.1
**Any comment/improvement/patch is welcome.**
This plugin is very helpful monitoring Cisco stacks. However, With the bugs mentioned and no recent updates I decided to rewrite this in python for my environment. I need to add support for SNMP version 2 but, if your still using version 1 you may check out my plugin. https://github.com/wershlak/nagios_plugins/blob/master/check_cisco_stack.py
I'm very happy with this script! Wonderfull. However, you are missing a very important state! 'removed' We had a power outage and the script broke due to this and did not report a valid response /usr/lib64/nagios/plugins/check_snmp_cisco_stack: Use of uninitialized value in concatenation (.) or string at (eval 1) line 150,. my %STACK_STATES = ( '1' => 'waiting', '2' => 'progressing', '3' => 'added', '4' => 'ready', '5' => 'sdmMismatch', '6' => 'verMismatch', '7' => 'featureMismatch', '8' => 'newMasterInit', '9' => 'provisioned', '10' => 'invalid', '11' => 'Removed', ); Apart from that, thank you very much!
Good script! However I would like to see more checks in this.. for example temp cpu etc of individual devices in the stack, is that possible?
The OID for stack state (1.3.6.1.4.1.9.9.500.1.2.1.1.6) can return Integer:11 which does not have appropriate entry in %STACK_STATES. According to http://tools.cisco.com/Support/SNMP/do/BrowseOID.do?objectInput=1.3.6.1.4.1.9.9.500.1.2.1.1.6&translate=Translate&submitValue=SUBMIT after line 45, one more line should be added: '11' => 'removed' With this change (and the one pointed out by tt-ts), it works great. Thanks!
To get a 3650 Stack working you have to replace the line... my $id = ( $$result{$key} * 1000 ) + 1; ... with ... my @key_split = split('.', $key); my $id = pop @key_split; 3750 will work with this change as well.
First of all: thanks for that good piece of code but in line number 142 there is a small bug if ( $members{$member} == 4 or 9 ) this condition always turns to true (at least for me) I guess it should be: if ( $members{$member} == 4 or $members{$member} == 9 ) regards, thomas
i tested it with a 2960s stack and it seems to work perfectly
You must be logged in to submit a review.
To:
From: