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 SNMP CPU Load

Rating
7 votes
Favoured:
2
Current Version
1.3.2
Last Release Date
2012-11-13
Compatible With
  • Nagios 3.x
Owner
License
GPL
Hits
156230
Files:
FileDescription
check_snmp_load.plcheck_snmp_load.pl
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
Checks by snmp load or cpu usage (Windows, Linux/Unix, AS400, Cisco, Cisco ASA5500, Cisco catalyst, HP Procurve, LinkProof, Blucoat, Nokia, Fortinet, Netscreen, HP-UX). Current version 1.3.3

Nov 13, 2012 - Updated Perfdata to allow better use of data for third party software.
Origanaly created by Patrick Proy. Added Cisco ASA5500 Platform.

Performance data output possible.
Script language : Perl
Supported plateforms : Windows, Linux/Unix, AS400, Cisco (routers, ASA, Pix, catalyst), HP Procurve, LinkProof, Blucoat, Nokia, Fortinet, Netscreen, HP-UX.

Requirements : Net-snmp and Perl with module Net::SNMP
Version : 1.3.2

./check_snmp_load.pl -h

SNMP Load & CPU Monitor for Nagios version 1.3.2
GPL licence, (c)2004-2007 Patrick Proy

Usage: ./check_snmp_load.pl [-v] -H -C [-2] | (-l login -x passwd [-X pass -L ,]) [-p ] -w -c -T=[stand|netsl|netsc|as400|cisco|cata|c5500|nsc|fg|bc|nokia|hp|lp|hpux] [-f] [-t ] [-V]
-v, --verbose
print extra debugging information
-h, --help
print this help message
-H, --hostname=HOST
name or IP address of host to check
-C, --community=COMMUNITY NAME
community name for the host's SNMP agent (implies v1 protocol)
-2, --v2c
Use snmp v2c
-l, --login=LOGIN ; -x, --passwd=PASSWD
Login and auth password for snmpv3 authentication
If no priv password exists, implies AuthNoPriv
-X, --privpass=PASSWD
Priv password for snmpv3 (AuthPriv protocol)
-L, --protocols=,
: Authentication protocol (md5|sha : default md5)
: Priv protocole (des|aes : default des)
-P, --port=PORT
SNMP port (Default 161)
-w, --warn=INTEGER | INT,INT,INT
1 value check : warning level for cpu in percent (on one minute)
3 value check : comma separated level for load or cpu for 1min, 5min, 15min
-c, --crit=INTEGER | INT,INT,INT
critical level for cpu in percent (on one minute)
1 value check : critical level for cpu in percent (on one minute)
3 value check : comma separated level for load or cpu for 1min, 5min, 15min
-T, --type=stand|netsl|netsc|as400|cisco|cata|c5500|bc|nokia|hp|lp
CPU check :
stand : standard MIBII (works with Windows),
can handle multiple CPU.
netsl : linux load provided by Net SNMP (1,5 & 15 minutes values)
netsc : cpu usage given by net-snmp (100-idle)
as400 : as400 CPU usage
cisco : Cisco CPU usage
cata : Cisco catalyst CPU usage
c5500 : Cisco ASA 5500 CPU usage
nsc : NetScreen CPU usage
fg : Fortigate CPU usage
bc : Bluecoat CPU usage
nokia : Nokia CPU usage
hp : HP procurve switch CPU usage
lp : Linkproof CPU usage
hpux : HP-UX load (1,5 & 15 minutes values)
-f, --perfparse
Perfparse compatible output
-t, --timeout=INTEGER
timeout for SNMP in seconds (Default: 5)
-V, --version
prints version number
Reviews (5)
byanaumov, March 1, 2016
HP-UX doesn't support this OID: 1.3.6.1.2.1.25.3.3.1

So. we get "ERROR: Description table : Requested table is empty or does not exist."


sysDescr:
HP-UX host B.11.31 U ia64 2230895380
Overall does the job but perf data does not match Nagios 3.x API specs.

Thus I tweaked it. Also added a -m|-multicpu option to display perf data for each cpu (this is useful if you have a process looping in a core using 100% cpu). If you have once core then it doesn't show cpu0 (cpu0 and cpu_avg would be same).

How can I upload the new version I tweaked?
byFfeijo, November 13, 2013
Thanks for the beautiful work.
If interested let me know as I have no time to maintain a project. If you want to modify the check yourself the OID is .1.3.6.1.4.1.25506.2.6.1.1.1.1.6.65 (1 min CPU usage in %)
byanuff, December 19, 2011
Compiled under CentOS 6 x64 Works absolutely flawlessly.