Nrpe check_load commands


Hi quite new to nagios.

From the server i want to check the cpu with check_load.

nrpe.cfg (client) the command looks like this

the server

define service{ use generic-service host_name service_description CPU15 check_command check_nrpe!check_load -a "-w 15,10,5" "-c 30,25,20" }

[code]define command {
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$


the check_command check_nrpe!check_load -a “-w 15,10,5” "-c 30,25,20"
is the line i cant get to work, in the webgui it looks like this
NRPE: Command 30, 25, 20 not defined.


If i undesrtood this right

command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$

this command expects two arguments. $ARG1$ and $ARG2$
but this line:

check_command check_nrpe!check_load -a "-w 15,10,5" "-c 30,25,20"

is passing only one argument: check_load -a “-w 15,10,5” “-c 30,25,20”


I see, and how should i adjust the code lines to make it work better? :slight_smile:


You may start here:
example 2… :slight_smile:


Fixed it (sort of),
modifided the client to this

and the server to this

define service{ use generic-service host_name service_description CPU187 check_command check_nrpe!check_load!15,10,5!30,25,20 }

But now i dont really get the warning to work, i tryed to created a bash loop that took 100% cpu (according to top) and nagios told me that it was “ok”.


Load average is different from cpu time…
You have to check it against the right numbers :slight_smile: … d-averages

is the check returning ok? with what numbers? compare them to the results in top. (up right you have load average)