I have installed Nagios 2-0b3 on RH9 and all seeems to be working fine. Notifications work, info received from Windows and novell systems etc. I would like to change the ping times so that normal network usage which varies from <10ms to > 50 ms depending on location and network speed. I have read the doco but cannot seem to get it to change the notifications so I do not get a yellow warning if the ping time is greater than the standard which seems to be 10ms or greater. I have changed the values but seem to get no where. Basically I do not understand the doco for the check_ping command and its variable.
in checkcommands how is check_ping defined?
you should have a couple of Args passed to it… (critical and warning values)
In this way you can define different times for each host you are going to ping… simply passing the % and ms values you like.
this way we want a critical over 1000 ms or loosing 2 packets (out of 5 we are sending) and a critical if the return time is over 2000 ms or we loose 3 packets.
Thanks for the update. I did check the checkcommands.cfg for the ping command format and it is
’check_ping’ command definition
define command{
command_name check_ping
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5
}
and the services.cfg is
Service definition
define service{
use generic-service ; Name of service template to use
which I believe is the standard as to how the product installs. I changed the valuses to as you stated and still get a warning if the ping time is > 10ms.
might sound stupid… did you restart nagios?
Try checking the command which is being used in the view config menu…
eventually test if you have multiple nagios instances running.
You stated that your services.cfg file was this:
" check_command check_ping!100.0,20%!500.0,60%"
But then you state by doing a ps -ef that nagio is running this:
" /usr/local/nagios/libexec/check_ping -H 172.25.1.253 -w 10:20% -c 60:100%"
What’s wrong with this picture? Where did 10:20% come from? Shouldn’t it be 100.0,20% What’s the : for? Double check your configs, paste your command definition for check_ping, your services.cfg definition for check_command and the output that you get when nagios runs the check.
Apologies for not getting back to you earlier as I had a couple of days off. I found the problem in the commands-plugin.cfg the line is
command[check_ping]=/usr/local/nagios/libexec/check_ping -H $HOSTADDRESS$ -w 10:20% -c 60:100%
I have modified the line to its correct format and hey presto all seems to work.