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

check_stack_netgear.sh

Rating
1 vote
Favoured:
1
Current Version
1.0
Last Release Date
2015-05-21
Compatible With
  • Nagios 3.x
License
GPL
Hits
4859
Files:
FileDescription
check_stack_netgear.shcheck_stack_netgear.sh
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
Check stack status of Netgear switches
(Count in SNMP the physical number of units in the stack)
Script usage:
$0 -H host -e [-c community] [-v version]
[-s 'any_snmp_args'] [-V] [--help]

Options :
-h, --help This help
-H, --host Checked switch virtual IP
-c, --community SNMP MIB (default = public)
-e, --expected Expected switches count
-p, --port SNMP port (default = 161)
-s, --snmp-args Any SNMP args you d'like to add to snmpwalk command
(credentials for SNMPv3, or whatever)
-v, --version SNMP version (default = 2c)
-V, --verbose Verbose output, mainly for debugging


Example: check for 2 switches in stack:
check_stack_netgear.sh -H 1.2.3.4 -e 2


Nagios definition example:
define command{
command_name check_stack_netgear
command_line $USER1$/check_stack_netgear.sh -H $HOSTADDRESS$ -e $ARG2$
}
define service{
use generic-service
host_name Switch-XXX
service_description Stack with 2 members
check_command check_stack_netgear!2
}


How it work:
It simply perform a snmpwalk on ENTITY-MIB:entPhysicalEntry (OID 1.3.6.1.2.1.47.1.1.1.1.7), search for 'Unit' devices and count them.
Reviews (1)
Hi there,
than you for the script

I have this output with GS748TS http://pastebin.com/6xePiCqn


Could you add in the script to count the "Slot" if doesn't find the "Unit"



thank you again