If i want nagios to use the check-host-alive to check if host is up 15 times, once per minute (i want only check-host-alive to check 15 times, not all plugins) before saying that the host is down, all I need to do is modify max_check_attempts to 15 at the host definition? Or what do i have to do?
You’re on the right way. That’s exactly what you should do.
Only in host definition set max_check_attempts to 15 and that should do that it doesn’t send the notification of host being down before those 15 checks aren’t completed and their return status is different from OK in every of those 15 checks.
In web interface there will, of course, say that the host is down whenever the check-host-alive returns DOWN status.
I use the default nagios template for host definition, when My host is restarting or down nagios doesn
Nagios is not real-time monitoring system. It checks on demand as user specifies his/hers needs. Check-host-alive doesn’t check host in a way that a service with check_ping command does. Take a look at the note at the check_interval within host definition in documentation:
nagios.sourceforge.net/docs/2_0/ … .html#host
If you want to ping desired host on a regular basis, I would suggest that you create a service with check_ping and set it to check_interval of 1.
okay I have a host definitation template as this :
And check_host_alive command definition as in command.cfg
‘check-host-alive’ command definition
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
So, when I apply this to any host - isn
Lower the max_check_attempts.
Although I wuold strongly suggest that you create a service with the check_ping command for that host.