Network Connections, Stats and Bandwidth

check_nwc_health

Description:

check_nwc_health is a plugin which is used to monitor network components. Use it to monitor devices like Cisco IOS, Cisco Nexus, F5 BIG-IP, CheckPoint Firewall1, Juniper NetScreen, HP Procurve, Nortel, Brocade 4100/4900, EMC DS 4700, EMC DS 24, Allied Telesyn, Blue Coat ProxySG, Cisco Wireless Lan Controller 5500, Cisco MDS 9124, Brocade ICX6610-24-HPOE, NX-OS, FOUNDRY-SN-AGENT-MIB, FRITZ!BOX 7390, FRITZ!DECT 200, Juniper IVE Pulse Gateway MAG4610, Cisco IronPort AsyncOS.
Originally it was written to check interface usage and hardware health (cpu, memory, power supply, fans, temperature) of Cisco switches. Today it covers the major manufacturers.

Current Version

2.5

Last Release Date

2013-06-01

Compatible With

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

License

GPL


Project Notes
$ plugins-scripts/check_nwc_health --help check_nwc_health $Revision: 1.8 $ [http://labs.consol.de/nagios/check_nwc_health] This nagios plugin is free software, and comes with ABSOLUTELY NO WARRANTY. It may be used, redistributed and/or modified under the terms of the GNU General Public Licence (see http://www.fsf.org/licensing/licenses/gpl.txt). This plugin checks various parameters of network components Usage: check_nwc_health [ -v|--verbose ] [ -t ] --hostname --community ...] -?, --usage Print usage information -h, --help Print detailed help screen -V, --version Print version information -t, --timeout=INTEGER Seconds before plugin times out (default: 15) -v, --verbose Show details for command-line debugging (can repeat up to 3 times) --blacklist Blacklist some (missing/failed) components --hostname Hostname or IP-address of the switch or router --port The SNMP port to use (default: 161) --protocol The SNMP protocol to use (default: 2c, other possibilities: 1,3) --community SNMP community of the server (SNMP v1/2 only) --username The securityName for the USM security model (SNMPv3 only) --authpassword The authentication password for SNMPv3 --authprotocol The authentication protocol for SNMPv3 (md5|sha) --privpassword The password for authPriv security level --privprotocol The private protocol for SNMPv3 (des|aes|aes128|3des|3desde) --warning The warning threshold --mode A keyword which tells the plugin what to do uptime (Check the uptime of the device) hardware-health (Check the status of environmental equipment (fans, temperatures, power)) cpu-load (Check the CPU load of the device) memory-usage (Check the memory usage of the device) interface-usage (Check the utilization of interfaces) interface-errors (Check the error-rate of interfaces (errors+discards per sec)) interface-status (Check the status of interfaces) list-interfaces (Show the interfaces of the device and update the name cache) list-interfaces-detail (Show the interfaces of the device and some details) create-shinken-service (Create a Shinken service definition) hsrp-state (Check the state in a HSRP group) hsrp-failover (Check if a HSRP group's nodes have changed their roles) list-hsrp-groups (Show the HSRP groups configured on this device) ha-role (Check the role in a ha group) svn-status (Check the status of the svn subsystem) mngmt-status (Check the status of the management subsystem) fw-policy (Check the installed firewall policy) fw-connections (Check the number of firewall policy connections) pool-completeness (Check the members of a load balancer pool) list-pools (List load balancer pools) walk (Show snmpwalk command with the oids necessary for a simulation) --name The name of an interface --regexp A flag indicating that --name is a regular expression --ifspeedin Override the ifspeed oid of an interface (only inbound) --ifspeedout Override the ifspeed oid of an interface (only outbound) --ifspeed Override the ifspeed oid of an interface --units One of %, B, KB, MB, GB, Bit, KBi, MBi, GBi. (used for e.g. mode interface-usage) --role The role of this device in a hsrp group (active/standby/listen) --lookback The amount of time you want to look back when calculating average rates. Use it for mode interface-errors or interface-usage. Without --lookback the time between two runs of check_nwc_health is the base for calculations. If you want your checkresult to be based for example on the past hour, use --lookback 3600. --critical The critical threshold --mitigation The parameter allows you to change a critical error to a warning. --servertype The type of the network device: cisco (default). Use it if auto-detection is not possible --statefilesdir An alternate directory where the plugin can save files --snmpwalk A file with the output of a snmpwalk (used for simulation) Use it instead of --hostname --snmphelp Output the list of OIDs you need to walk for a simulation file --multiline Multiline output
Reviews (4) Add a Review
Great to have it...
by nishith, January 31, 2023

The plugin worked properly without any errors. Just you need to install several perl files using "YUM or CPAN". Upon satisfaction of those prerequisites, you're good to go. Worked Commands: ./check_nwc_health --hostname 10.10.0.1 --community nnv007 --mode cpu-load ./check_nwc_health --hostname 10.10.0.1 --community nnv007 --mode uptime ./check_nwc_health --hostname 10.10.0.1 --community nnv007 --mode memory-usage ./check_nwc_health --hostname 10.10.0.1 --community nnv007 --mode count-routes ./check_nwc_health --hostname 10.10.0.1 --community nnv007 --mode list-routes nnv007 is my SNMP v2 Community Name. My "command.cfg" file. ================================= define command{ command_name check_cisco_nexus command_line $USER1$/check_nwc_health --hostname $HOSTADDRESS$ --community $ARG1$ --mode $ARG2$ } ================================= My "cisco.cfg" file. define service{ use network-service host_name cisco-nexus-1,cisco-nexus-2 service_description Check CPU Load check_command check_cisco_nexus!nnv007!cpu-load } ================================= You can replace cpu-load with, memory-usage uptime count-routes check-config & Many More...



Very good plugin!
by dozla, October 31, 2014

Works like a charm



Great plugin
by snapon, April 30, 2014

Great plugin! Is there a way to change the uptime to show in a unit larger than minutes? Would be helpful to see it in days, weeks, months, etc.



Getting errors
by fogier, May 31, 2013

I’ve tried your plugin for Nagios but I ran into some problems after compiling. I’m using Nagios XI 2012v1.6 on CentOS 6.3 (x64) --with-nagios-group=nagios --with-perl=/usr/bin/perl Make Make install When I execute the plugin (as root) to a HP Procurve switch I get an error: [root@SV14808 libexec]# ./check_nwc_health --hostname AC07887 Use of uninitialized value in pattern match (m//) at ./check_nwc_health line 14348. Use of uninitialized value in string eq at ./check_nwc_health line 14352. Use of uninitialized value in string eq at ./check_nwc_health line 14352. Use of uninitialized value in string eq at ./check_nwc_health line 14352. Use of uninitialized value in string eq at ./check_nwc_health line 14352. Use of uninitialized value in string eq at ./check_nwc_health line 14352. Use of uninitialized value in string eq at ./check_nwc_health line 14352. Use of uninitialized value in string eq at ./check_nwc_health line 14352. Use of uninitialized value in string eq at ./check_nwc_health line 14352. Use of uninitialized value in string eq at ./check_nwc_health line 14352. Use of uninitialized value in string eq at ./check_nwc_health line 14352. Use of uninitialized value in string eq at ./check_nwc_health line 14352. Use of uninitialized value in string eq at ./check_nwc_health line 14352. Use of uninitialized value in string eq at ./check_nwc_health line 14352. Use of uninitialized value in string eq at ./check_nwc_health line 14352. Use of uninitialized value in string eq at ./check_nwc_health line 14352. Use of uninitialized value in string eq at ./check_nwc_health line 14352. Use of uninitialized value in string eq at ./check_nwc_health line 14352. Use of uninitialized value in string eq at ./check_nwc_health line 14352. Use of uninitialized value in string eq at ./check_nwc_health line 14352. Use of uninitialized value in string eq at ./check_nwc_health line 14352. Use of uninitialized value in string eq at ./check_nwc_health line 14352. Use of uninitialized value in string eq at ./check_nwc_health line 14352. Use of uninitialized value in string eq at ./check_nwc_health line 14352. Use of uninitialized value in string eq at ./check_nwc_health line 14352. Use of uninitialized value in string eq at ./check_nwc_health line 14352. Use of uninitialized value in string eq at ./check_nwc_health line 14352. Use of uninitialized value in string eq at ./check_nwc_health line 14352. Use of uninitialized value in string eq at ./check_nwc_health line 14352. Use of uninitialized value in string eq at ./check_nwc_health line 14352. Use of uninitialized value in string eq at ./check_nwc_health line 14358. Use of uninitialized value in printf at ./check_nwc_health line 14360. UNKNOWN - mode check_nwc_health $Revision: 1.9.7.3 $ [http://labs.consol.de/nagios/check_nwc_health] Am I missing something. Hope to hear from you.



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.8 (13)
Favorites
4
Views
98,021