1

I have a very strange issue.
It seems that when I execute a check_nrpe command to check the load on remote machines, it works on server1, but exactly the same command does not work on server2, and it returns:

Warning threshold must be float or float triplet!
Usage:
check_load [-r] -w WLOAD1,WLOAD5,WLOAD15 -c CLOAD1,CLOAD5,CLOAD15

Both machines are similar, CentOS 7. On both machines I installed the NRPE agent as follows:
yum install nrpe

and on both machines I installed the check_load plugin as follows:
yum install nagios-plugins-load

The command is defined on both server1 and server2 in exactly the same way, in the /etc/nrpe.d/commands.cfg file:

command[check_load]=/usr/lib64/nagios/plugins/check_load -r -w $ARG1$ -c $ARG2$  

I restart the the NRPE service on both machines after config changes, so that is not the problem. Now the actual NRPE command that I am sending to server1 and server2 is:
check_nrpe -H server1 -c check_load -a .15,.10,.05 .30,.25,.20

output server1:

OK - load average per CPU: 0.00, 0.01, 0.03|load1=0.000;0.150;0.300;0; load5=0.005;0.100;0.250;0; load15=0.025;0.050;0.200;0;  

Exactly the same command to server2:
check_nrpe -H server2 -c check_load -a .15,.10,.05 .30,.25,.20
results in the above warning message!

Executing the check_load command locally on server1 and server2, works on both servers.. so this is an issue with NRPE? But then why is server1 working and server2 not..? SELinux is turned off everywhere..

How is this possible?! This does not make any sense!

UPDATE:
After I change my commands.cfg file on server2 to:
command[check_load]=/usr/lib64/nagios/plugins/check_load -r $ARG1$ $ARG2$
(removed the -w and -c flags)

and then do this command:

check_nrpe -H server2 -c check_load -a -w 0.15 -c 0.30
the status is returned, no warning anymore, but it returns the status of the load in CRITICAL.. and if I do the command locally on server2 with the same threshold values, it returns OK..
check_load -w 0.15 -c 0.30

is this a bug in NRPE?

UPDATE:
It seems to have happened before:
https://forums.meulie.net/t/warning-threshold-must-be-float-or-float-triplet/1525

but no solution given unfortunately..

uPdAtE:

SoLuTiOn:
The server that is receiving NRPE commands, must allow incoming arguments, so this must be set in /etc/nagios/nrpe.cfg:
dont_blame_nrpe=1

Solved :P

John
  • 39
  • 4

0 Answers0