Hello
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.
alright, thanks!
hi,
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.
hello there,
okay I have a host definitation template as this :
define host{
name windows-server
use generic-host
check_period 24x7
check_interval 1
retry_interval 1
max_check_attempts 10
check_command check-host-alive
notification_period 24x7
notification_interval 1
notification_options d,r
contact_groups admins
hostgroups windows-servers
icon_image windows.png
register 0
}
And check_host_alive command definition as in command.cfg
‘check-host-alive’ command definition
define command{
command_name check-host-alive
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.