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_nwc_health

Rating
13 votes
Favoured:
4
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
Owner
License
GPL
Hits
98223
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_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.
$ 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)
bynishith, January 11, 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...
bydozla, October 6, 2014
Works like a charm
bysnapon, April 24, 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.
byfogier, May 1, 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.