check_ping vs. check_icmp? Unexpected output.

John P. Rouillard rouilj at cs.umb.edu
Fri Oct 14 14:39:53 CEST 2005


In message <434F6442.8020004 at op5.se>,
Andreas Ericsson writes:

>Nate Carlson wrote:
>> What's the difference between check_ping and check_icmp?
>> 
>check_icmp can also be used in check_host mode (create a symlink 
>check_host -> check_icmp and execute check_host) which runs extremely 
>quickly to determine if a host is up whenever a service check fails. 
>Ordinary check_ping would take 5 seconds to determine that the host is 
>up in an ordinary setup, while check_host usually does the same trick in 
>just about the same amount of time as it takes for a packet to make a 
>round trip to the destination target (usually between 1 and 10 
>milliseconds on a local network).

That is great info. "check_icmp -h" doesn't mention the check_host
functioanlity at all.

>Considering the fact that service checks aren't executed while host 
>checks are running, the check_host mode of check_icmp is a fairly major 
>improvement in terms of overall Nagios performance.


I have the check_host link in place and with the 1.4.2 release of the
plugins, with cvs id:

   * $Id: check_icmp.c,v 1.5 2005/02/01 07:33:13 stanleyhopcroft Exp $

I am getting (manually wrapped):

  /usr/lib/nagios/plugins/check_host www.yahoo.com www.freshmeat.net
  mode: 1
  mode: 1
  mode: 1
  mode: 1
  mode: 1
  mode: 1
  mode: 1
  mode: 1
  mode: 1
  OK - www.yahoo.com responds to ICMP. Packet 1, rta 25.769ms| \
      pkt=1;;0;5 rta=25.769;1000.000;1000.000;;


Can I just comment out the code that reports the mode?  Also with -v
-v specified, the command line above causes a segfault.

  /usr/lib/nagios/plugins/check_host -v -v www.yahoo.com www.freshmeat.net
  mode: 1
  mode: 1
  mode: 1
  mode: 1
  mode: 1
  mode: 1
  mode: 1
  mode: 1
  mode: 1
  ttl set to 64
  Setting alarm timeout to 10 seconds
  packets: 5, targets: 9
  target_interval: 0.000, pkt_interval 1000.000
  crit.rta: 1000.000
  max_completion_time: 91000.000
  max_completion_time: 91000000  timeout: 10
  Timout must be at lest 92
  crit = {1000000, 100%}, warn = {1000000, 100%}
  pkt_interval: 1000000  target_interval: 0  retry_interval: 0
  icmp_pkt_size: 64  timeout: 10
  Segmentation fault

but with 1 -v, it succeeds:

  /usr/lib/nagios/plugins/check_host -v www.yahoo.com www.freshmeat.net
  mode: 1
  mode: 1
  mode: 1
  mode: 1
  mode: 1
  mode: 1
  mode: 1
  mode: 1
  mode: 1
  ttl set to 64
  Setting alarm timeout to 10 seconds
  packets: 5, targets: 9
  target_interval: 0.000, pkt_interval 1000.000
  crit.rta: 1000.000
  max_completion_time: 91000.000
  max_completion_time: 91000000  timeout: 10
  Timout must be at lest 92
  crit = {1000000, 100%}, warn = {1000000, 100%}
  pkt_interval: 1000000  target_interval: 0  retry_interval: 0
  icmp_pkt_size: 64  timeout: 10
  25.784 ms rtt from 216.109.117.206, outgoing ttl: 64, incoming ttl: 58
  OK - www.yahoo.com responds to ICMP. Packet 1, rta 25.784ms| \
      pkt=1;;0;5 rta=25.784;1000.000;1000.000;;

Also, if I change the host to
    /usr/lib/nagios/plugins/check_host www.ibm.com

I get

  mode: 1
  mode: 1
  mode: 1
  mode: 1
  mode: 1
  mode: 1
  Segmentation fault

not exactly what I was expecting. With -v's I get:

   /usr/lib/nagios/plugins/check_host -v -v -v www.ibm.com
   mode: 1
   mode: 1
   mode: 1
   mode: 1
   mode: 1
   mode: 1
   ttl set to 64
   Setting alarm timeout to 10 seconds
   packets: 5, targets: 6
   target_interval: 0.000, pkt_interval 1000.000
   crit.rta: 1000.000
   max_completion_time: 61000.000
   max_completion_time: 61000000  timeout: 10
   Timout must be at lest 62
   icmp_pkt_size = 64
   icmp_pkt_size = 64
   crit = {1000000, 100%}, warn = {1000000, 100%}
   pkt_interval: 1000000  target_interval: 0  retry_interval: 0
   icmp_pkt_size: 64  timeout: 10
   Segmentation fault


Note that www.ibm.com resolves but doesn't respond to pings.

Also the nagios-plugins Makefile fails to create the links to
check_host or check_rta_multi.

				-- rouilj
John Rouillard
===========================================================================
My employers don't acknowledge my existence much less my opinions.


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list