We want to understand why the check_cpu_stats.sh plugin only has thresholds set for iowait and not cpuuser.
Can you please help us to modify this so that we can set the thresholds for cpuuser as well?
Attached is the plugin we are using.
Code: Select all
[root@hostname etc]# /usr/local/nagios/libexec/check_cpu_stats.sh -w 45 -c 50
CPU STATISTICS OK : user=2.49% system=1.25% iowait=0.25% idle=96.01% nice=0.00% steal=0.00% | CpuUser=2.49;CpuSystem=1.25;CpuIoWait=0.25;CpuIdle=96.01;CpuNice=0.00;CpuSteal=0.00;45;50
[root@hostname etc]# /usr/local/nagios/libexec/check_cpu_stats.sh -h
check_cpu_stats.sh Revision 2.1.1 - CPU Utilization check script for Nagios
Usage: check_cpu_stats.sh -w -c (-i -n)
-w Warning level in % for cpu iowait
-c Crical level in % for cpu iowait
-i Interval in seconds for iostat (default : 1)
-n Number report for iostat (default : 3)
-h Show this page
Usage: check_cpu_stats.sh
Usage: check_cpu_stats.sh --help
This plugin will check cpu utilization (user,system,iowait,idle in %)