Home Directory Plugins Hardware Network Gear Cisco Check cisco 3750 stack status

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

Check cisco 3750 stack status

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
Hits
132768
Files:
FileDescription
check_snmp_cisco_stack.plVersion 1.3.3 (20160219)
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!
Check the status of a Cisco Catalyst 3750,3650,3850 stack via SNMP
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)
bywershlak, November 27, 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
byPaulisse85, May 7, 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!
bysiggi, November 25, 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?
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.
bytt-ts, November 18, 2011
1 of 1 people found this review helpful
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
byalfred, July 13, 2011
1 of 1 people found this review helpful
i tested it with a 2960s stack and it seems to work perfectly