apa123
October 22, 2010, 10:44pm
1
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 192.168.1.5
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$
}[/code]
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.
luca
October 23, 2010, 7:12am
2
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”
apa123
October 23, 2010, 1:09pm
3
I see, and how should i adjust the code lines to make it work better?
luca
October 23, 2010, 3:26pm
4
apa123
October 23, 2010, 5:14pm
5
Fixed it (sort of),
modifided the client to this
and the server to this
define service{
use generic-service
host_name 172.28.2.5
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”.
luca
October 23, 2010, 5:26pm
6
Load average is different from cpu time…
You have to check it against the right numbers
blog.scoutapp.com/articles/2009/ … d-averages
is the check returning ok? with what numbers? compare them to the results in top. (up right you have load average)