I'm having this strange problem: Using check_nrpe
, it doesn't return correct result for check_cpu_perf
. It works fine for other NRPE plug-ins though. e.g.
On the Nagios Server:
[root@ftppm01 nagios]# /usr/lib64/nagios/plugins/check_nrpe -H talend-admin-app-01.local -c check_users -a '5 10'
USERS OK - 1 users currently logged in |users=1;5;10;0
[root@ftppm01 nagios]# /usr/lib64/nagios/plugins/check_nrpe -H talend-admin-app-01.local -c check_load -a '15,10,5 30,25,20'
OK - load average: 0.00, 0.05, 0.08|load1=0.000;15.000;30.000;0; load5=0.050;10.000;25.000;0; load15=0.080;5.000;20.000;0;
[root@ftppm01 nagios]# /usr/lib64/nagios/plugins/check_nrpe -H talend-admin-app-01.local -c check_cpu_perf -a '20 10'
OK: CPU Idle = % | CpuUser=; CpuNice=; CpuSystem=; CpuIowait=; CpuSteal=; CpuIdle=:20:10
On the client, check_cpu_perf
works just fine by itself:
[root@ftaps01 plugins]# /usr/lib64/nagios/plugins/check_cpu_perf/check_cpu_perf 20 10
OK: CPU Idle = 98.38% | CpuUser=0.34; CpuNice=0.00; CpuSystem=0.34; CpuIowait=0.94; CpuSteal=0.00; CpuIdle=98.38:20:10
But again, the very same result using check_nrpe
:
[root@ftaps01-lvpr-uk-local plugins]# /usr/lib64/nagios/plugins/check_nrpe -H localhost -c check_cpu_perf -a '20 10'
OK: CPU Idle = % | CpuUser=; CpuNice=; CpuSystem=; CpuIowait=; CpuSteal=; CpuIdle=:20:10
any idea what am I doing wrong? Or how to debug this issue? Cheers!!
I do not know what script you use, I found something similar here: http://exchange.nagios.org/directory/Plugins/System-Metrics/CPU-Usage-and-Load/Check-CPU-Performance/details
The above script uses sar, lparstat and lslpp. The nagios-nrpe module runs as nagios user and it is possible that sar ,lparstat or lslpp cannot be executed as non root users.
if you are not using the above script let us know what other script are you using.
Goodluck.