check_nrpe with check_cpu_stats always returns OK on Linux
Posted: Thu Jul 17, 2014 2:49 pm
We are using the check_nrpe plugin to monitor our linux servers. no matter what arguments I put in for check_cpu_stats, it returns CPU STATISTICS OK.
sample command:
# /usr/local/nagios/libexec/check_nrpe -H serverName -t 30 -c check_cpu_stats -a '-w 85 -c 95'
example output
CPU STATISTICS OK: user=13.64% system=1.21% iowait=0.10% idle=85.05% | user=13.64% system=1.21% iowait=0.10%;85;95 idle=85.05%
So I tried with low thresholds like warn at 1% and critical at 2% and it returns OK.
# /usr/local/nagios/libexec/check_nrpe -H serverName -t 30 -c check_cpu_stats -a '-w 1 -c 2'
CPU STATISTICS OK: user=14.30% system=1.41% iowait=0.10% idle=84.19% | user=14.30% system=1.41% iowait=0.10%;1;2 idle=84.19%
I tried adding in % sign to see if that changed anything, it did not.
# /usr/local/nagios/libexec/check_nrpe -H serverName -t 30 -c check_cpu_stats -a '-w 1% -c 2%'
CPU STATISTICS OK: user=13.64% system=1.52% iowait=0.00% idle=84.85% | user=13.64% system=1.52% iowait=0.00%;1%;2% idle=84.85%
What is the proper syntax for this to actually get warnings?
NRPE agent on host machine is: NRPE v2.14
Nagios XI Version : 2014R1.2
NagiosServer 2.6.32-358.2.1.el6.x86_64 x86_64
CentOS release 6.5 (Final)
Gnome is not installed
Apache Information
PHP Version: 5.3.3
Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0
Server Name: NagiosServer
Server Address: x.x.x.x
Server Port: 80
sample command:
# /usr/local/nagios/libexec/check_nrpe -H serverName -t 30 -c check_cpu_stats -a '-w 85 -c 95'
example output
CPU STATISTICS OK: user=13.64% system=1.21% iowait=0.10% idle=85.05% | user=13.64% system=1.21% iowait=0.10%;85;95 idle=85.05%
So I tried with low thresholds like warn at 1% and critical at 2% and it returns OK.
# /usr/local/nagios/libexec/check_nrpe -H serverName -t 30 -c check_cpu_stats -a '-w 1 -c 2'
CPU STATISTICS OK: user=14.30% system=1.41% iowait=0.10% idle=84.19% | user=14.30% system=1.41% iowait=0.10%;1;2 idle=84.19%
I tried adding in % sign to see if that changed anything, it did not.
# /usr/local/nagios/libexec/check_nrpe -H serverName -t 30 -c check_cpu_stats -a '-w 1% -c 2%'
CPU STATISTICS OK: user=13.64% system=1.52% iowait=0.00% idle=84.85% | user=13.64% system=1.52% iowait=0.00%;1%;2% idle=84.85%
What is the proper syntax for this to actually get warnings?
NRPE agent on host machine is: NRPE v2.14
Nagios XI Version : 2014R1.2
NagiosServer 2.6.32-358.2.1.el6.x86_64 x86_64
CentOS release 6.5 (Final)
Gnome is not installed
Apache Information
PHP Version: 5.3.3
Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0
Server Name: NagiosServer
Server Address: x.x.x.x
Server Port: 80