Linux

Linux CPU Check with Top 5 Processes

Description:

This Plugin provides hopefully all the info you would ever need about your CPU:

– Returns Stats for User, System, and IOWait
– Allows for setting Warning/Critical levels globally or for each individual stat
– When a Warning or Critical threshold is reached for User or System stats, the plugin also returns a list of the 5 processes using the most CPU
– Returns Performance Data

Current Version

Last Release Date

2014-08-22

Compatible With

  • Nagios 3.x
  • Nagios 4.x
  • Nagios XI

Owner


Project Files
Project Notes
This is a variant on the check script made by Andreas Baess with some new features. This Plugin provides hopefully all the info you would ever need about your CPU: - Returns Stats for User, System, and IOWait - Allows for setting Warning/Critical levels globally or for each individual stat - When a Warning or Critical threshold is reached for User or System stats, the plugin also returns a list of the 5 processes using the most CPU - Returns Performance Data Plugin Requirements: - IOStat This is not included by default with all linux distros. To install on Ubuntu (and probably other Debian variants) - apt-get install sysstat Usage Info (this can also be found using -h): -w : Global Warning level in % for user/system/io-wait cpu -uw : Warning level in % for user cpu -iw : Warning level in % for IO_wait cpu -sw : Warning level in % for system cpu -c : Global Critical level in % for user/system/io-wait cpu -uc : Critical level in % for user cpu -ic : Critical level in % for IO_wait cpu -sc : Critical level in % for system cpu -i : Interval in seconds for iostat (default : 1) -n : Number report for iostat (default : 3) I have also included a pnp4nagios template for any interested.
Reviews (2) Add a Review
Works good
by GldRush98, July 31, 2017

Works good, just be sure to dos2unix the file like so: dos2unix check_cpu_linux.sh



keep getting a shell error with el6 and el7
by bindas, January 31, 2015

keep getting error if i execute the script directly. bash: ./check_cpu_linux.sh: /bin/bash^M: bad interpreter: No such file or directory if i comment out the shabang (#!/bin/bash) header. then i get this error. ./check_cpu_linux.sh ./check_cpu_linux.sh: line 36: $'r': command not found ./check_cpu_linux.sh: line 38: $'r': command not found ./check_cpu_linux.sh: line 40: $'r': command not found ./check_cpu_linux.sh: line 46: $'r': command not found ./check_cpu_linux.sh: line 58: $'r': command not found ./check_cpu_linux.sh: line 63: $'r': command not found ./check_cpu_linux.sh: line 68: $'r': command not found ./check_cpu_linux.sh: line 70: syntax error near unexpected token `$'{r'' '/check_cpu_linux.sh: line 70: `print_release() {



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 (3)
Favorites
0
Views
22,940