Cisco

Check cisco 3750 stack status

Description:

Check the status of a Cisco Catalyst 3750,3650,3850 stack via SNMP

Current Version

1.3.3

Last Release Date

2016-02-18

Compatible With

  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x
  • Nagios 4.x
  • Nagios XI

Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
Project Files
Project Notes
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. 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.**
Reviews (7) Add a Review
Still maintained??
by wershlak, November 30, 2015
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
Helpful? Yes  No 
Missing state
by Paulisse85, May 31, 2015
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!
Helpful? Yes  No 
Good script
by siggi, November 30, 2014
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?
Helpful? Yes  No 
Works with 3120 blade switches for HP
by srdjanb, September 30, 2014
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!
Helpful? Yes  No 
3650 Switch Stack is not working
by user123, February 28, 2014
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.
Helpful? Yes  No 
small bug
by tt-ts, November 30, 2011
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
1 of 1 found this review helpful.
Helpful? Yes 1 No 0
works perfect
by alfred, July 31, 2011
i tested it with a 2960s stack and it seems to work perfectly
1 of 1 found this review helpful.
Helpful? Yes 1 No 0
Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
4.6 (8)
Favorites
1
Views
132,702