Page 1 of 1

check_cpu_stats.sh plugin does not help monitor cpuuser

Posted: Wed Jan 06, 2021 1:57 am
by RebeccaIlene
Hi Team,

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 %)


Re: check_cpu_stats.sh plugin does not help monitor cpuuser

Posted: Wed Jan 06, 2021 12:52 pm
by dchurch
RebeccaIlene wrote:check_cpu_stats.sh Revision 2.1.1
(in the script attachment)
RebeccaIlene wrote:check_cpu_stats.sh Revision 1.3.1
Which one of these are you using?

There's Release 2.3.6 available out on the plugin exchange - Have you tried running that?