Differences of service check and host check?


my nagios set to check our hosts with check-host-alive, also it set to use ping as it service to check host availbility.

my question is why service check is more sensitive than host check?
we got a lot of critical warning from service check (ping), but there is none from host check (ping also).

thank you.


    check_command           check-host-alive
    max_check_attempts      10
    notification_interval   120
    notification_period     24x7
    notification_options    d,u,r


max_check_attempts		3
normal_check_interval		5
retry_check_interval		1
notification_interval		60
notification_period		24x7
notification_options		c,r
check_command			check_ping!200.0,20%!500.0,60%


First off, host checks are NEVER made unless a service check fails. The reason why one would be more sensitive than another, is because that is how you have it defined.

For example:
in checkcommands.cfg
define command{
command_name check-host-alive
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 1

define command{
command_name check_ping
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5

As you can see, the check_ping and the check-host-alive are both using the same check_ping command but with different settings on the -p option.

In your setup, I see you have max_check_attempts 3 for your service, so I am guessing, that in fact, your service never does go critical HARD, but only critical SOFT. Meaning, that yea, on the first try the check failed and shows critical, but on the 2nd or 3rd try, it in fact passed OK. Since it passed OK, then the host check will NOT be made. ONLY if your service check fails for 3 times, will it then make the host check. And since you have your host check set to max_check_attempts 10, I’m guessing that surely it will pass after 10 attempts.

Out of curiosity, how many ACTIVE service checks does your setup make? Also, start using check_icmp, instead of check_ping. Read the ./check_icmp --help, since it’s very important to know how to use it correctly.