Thanks for your answer,<br><br>In fact it is normal behavior to me also.<br>Thing that is not "normal behavior" to me is that between two checks, Nagios jumps from "SOFT 1" to "HARD 1" without doing the steps "SOFT 1" > "SOFT 2" > "SOFT 3" and finally "HARD 4".<br>
<br>Regards,<br>Samuel Bancal<br><br><div class="gmail_quote">2010/2/17 Morris, Patrick <span dir="ltr"><<a href="mailto:patrick.morris@hp.com">patrick.morris@hp.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Samuel Bancal wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">
Nagios Core 3.2.0<br>
nagios-plugins-1.4.14<br>
Ubuntu server 8.04.3 LTS<br>
<br>
Hi,<br>
<br>
I'm encountering problems to configure the notifications in case a server is no more responding to PING (ICMP).<br>
I don't understand why Nagios is jumping over steps when it's doing service-check "icmp".<br>
Here is the config :<br>
<br>
define host{<br>
  use                    generic-server<br>
  host_name              server1<br>
  alias                  server1<br>
  address                the.ip.the.ip<br>
  hostgroups             prod-servers<br>
  contact_groups         group1<br>
  check_command          check-host-alive<br>
  check_period           24x7<br>
  check_interval         5<br>
  retry_interval         1<br>
  max_check_attempts     4<br>
  notification_period    24x7<br>
  notification_interval  60<br>
  notification_options   d,u,r<br>
}<br>
<br>
define service{<br>
  use                     generic-service<br>
  host_name               server1<br>
  service_description     ICMP<br>
  check_command           check_icmp!100.0,20%!500.0,60%<br>
  max_check_attempts      4<br>
  normal_check_interval   5<br>
  retry_check_interval    1<br>
  notification_options    w,u,c,r<br>
  notification_interval   60<br>
  notification_period     24x7<br>
}<br>
[...]<br>
define command{<br>
  command_name    check-host-alive<br>
  command_line    $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5<br>
}<br>
define command{<br>
  command_name    check_icmp<br>
  command_line    $USER1$/check_icmp -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5<br>
}<br>
[...]<br>
<br>
Here is an example of history that I get :<br></div></div><div class="im">
Service Critical[2010-02-16 11:33:13] SERVICE ALERT: server1;ICMP;CRITICAL;SOFT;1;CRITICAL - the.ip.the.ip: rta nan, lost 100%<br></div><div class="im">
Host Down[2010-02-16 11:33:43] HOST ALERT: server1;DOWN;SOFT;1;(Host Check Timed Out)<br></div><div class="im">
Service Critical[2010-02-16 11:34:13] SERVICE ALERT: server1;ICMP;CRITICAL;HARD;1;CRITICAL - the.ip.the.ip: rta nan, lost 100%<br></div><div class="im">
Host Down[2010-02-16 11:34:43] HOST ALERT: server1;DOWN;SOFT;2;(Host Check Timed Out)<br></div><div class="im">
Host Down[2010-02-16 11:35:23] HOST ALERT: server1;DOWN;SOFT;3;(Host Check Timed Out)<br></div><div class="im">
Host Down[2010-02-16 11:36:33] HOST ALERT: server1;DOWN;HARD;4;(Host Check Timed Out)<br></div><div class="im">
Host Up[2010-02-16 11:37:43] HOST ALERT: server1;UP;HARD;1;PING OK - Packet loss = 0%, RTA = 0.67 ms<br></div><div class="im">
Service Ok[2010-02-16 11:39:13] SERVICE ALERT: server1;ICMP;OK;HARD;1;OK - the.ip.the.ip: rta 0.943ms, lost 0%<br>
<br>
Or later :<br></div><div class="im">
Host Down[2010-02-16 11:42:03] HOST ALERT: server1;DOWN;SOFT;1;(Host Check Timed Out)<br></div><div class="im">
Host Down[2010-02-16 11:43:13] HOST ALERT: server1;DOWN;SOFT;2;(Host Check Timed Out)<br></div><div class="im">
Service Critical[2010-02-16 11:44:13] SERVICE ALERT: server1;ICMP;CRITICAL;HARD;1;CRITICAL - the.ip.the.ip: rta nan, lost 100%<br></div><div class="im">
Host Down[2010-02-16 11:44:43] HOST ALERT: server1;DOWN;SOFT;3;(Host Check Timed Out)<br></div><div class="im">
Host Up[2010-02-16 11:45:53] HOST ALERT: server1;UP;SOFT;4;PING OK - Packet loss = 0%, RTA = 0.64 ms<br></div><div class="im">
Service Ok[2010-02-16 11:49:13] SERVICE ALERT: server1;ICMP;OK;HARD;1;OK - the.ip.the.ip: rta 0.948ms, lost 0%<br>
</div></blockquote>
<br>
If you're asking why Nagios runs a host check when it sees the service fail a check, that's normal behavior.<br>
<br>
When a service check fails, the first thing Nagios will do is look to see if the service failed because the host is down.<br>
</blockquote></div><br><br clear="all"><br>-- <br>Samuel Bancal - CH<br>