Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
sh-compliant script to check CPU utiliziation via Jiffies instead of parsing another frontend tool
Current Version
1.0
Last Release Date
2009-05-14
Owner
Mike Adolphs
Website
http://www.matejunkie.com/
Download URL
http://www.matejunkie.com/cpu-check-plugin-for-nagios/
Compatible With
The plugin (v1.0)
The appropriate PNP Template
GNU GPLv2 License
Description check_cpu.sh is a Nagios plugin to monitor CPU utilization. It makes use of /proc/stat and calculates it through Jiffies rather than using another frontend tool like iostat or top. When using optional warning/critical thresholds all values except idle are aggregated and compared to the thresholds. There's currently no support for warning/critical thresholds for specific usage parameters.
-h/--help Output check_cpu.sh [-i/--interval] [-w/--warning] [-c/--critical]
Options: --interval|-i) Defines the pause between the two times /proc/stat is being parsed. Higher values could lead to more accurate result. Default is: 1 second --warning|-w) Sets a warning level for CPU user. Default is: off --critical|-c) Sets a critical level for CPU user. Default is: off
Output example user@host:~$ ./check_cpu.sh OK - user: 8.42, nice: 0.50, sys: 6.66, iowait: 0.50, irq: 0.50, softirq: 0.50 idle: 86.40 | 'user'=8.42 'nice'=0.50 'sys'=6.66 'softirq'=0.50 'iowait'=0.50 'irq'=0.50 'idle'=86.40
Changelog * 2009-05-14 * Small bugfix of an exit code
Just One small correction , the pnp4nagios has an error with name of the fields : $def[1] = "DEF:used=$rrdfile:$DS[1]:AVERAGE " ; $def[1] .= "DEF:nice=$rrdfile:$DS[2]:AVERAGE " ; $def[1] .= "DEF:sys=$rrdfile:$DS[3]:AVERAGE " ; $def[1] .= "DEF:softirq=$rrdfile:$DS[4]:AVERAGE " ; $def[1] .= "DEF:iowait=$rrdfile:$DS[5]:AVERAGE " ; $def[1] .= "DEF:irq=$rrdfile:$DS[6]:AVERAGE " ; $def[1] .= "DEF:idle=$rrdfile:$DS[7]:AVERAGE " ; Regards,Diego
You must be logged in to submit a review.
To:
From:
We’ve completely redesigned the world’s largest repository of Nagios plugins and monitoring tools. Join thousands of users sharing monitoring solutions for servers, applications, and everything in between.
Due to our redesign, all existing accounts require a password reset to access your account again.
Ready to explore 6,100+ projects and contribute to the community?
Reset Password Create Account
Happy Monitoring!