[Nagiosplug-help] Question about check_icmp operation

Andreas Ericsson ae at op5.se
Sat Mar 19 07:39:22 CET 2005


Horvath Tamas wrote:
> Hi!
> 
> 
> I use check_icmp according to the following way:
> /usr/local/nagios/libexec/check_icmp -H host1 host2 ...host20 -c 10s,100% -b
> 56 -n 10 -t 20 -i 160 -I 10
> 
> Question 1:
> 
> I'm interested in how this plugin works.
> 
> Tip1: it pings host1 (send 10 ICMP echo packets to it), than ping host2 and
> so on.
> 
> Tip2: it sends the 1st ICMP echo packet to host1, than host2 and finally
> host20. After that it sends 2nd ICM echo packet to host1, than host2, etc.
> 
> Which one is correct?
> 

For the check_icmp distributed in the plugins package, guess 2 is 
correct. For the latest and greatest, found at http://oss.op5.se/nagios, 
guess 1 is correct. I might be wrong about the first statement. I can't 
remember exactly when I changed it, although I might change it back if 
it makes sense (the reason for the change originally was debugging, but 
I don't need the per-packet round-robin style, so I kept it the way it was).

> Question 2:
> 
> How can I interpret the timeout function?
> 
> Tip1: it related to ICMP echo packets, so if I send 10 of them to a non
> alive host, than the total run time would be 200s.
> 
> Tip2: it related to a host, so the program run time would be approxiately
> number_of_nonalive_hosts x 20 s + some additional time.
> 
> Which one is correct?
> 

Again, I'm not sure how the one included in the official distribution 
works. The version at http://oss.op5.se/nagios calculates maximum 
runtime like so; (packets * hosts) * (critical_rta + packet_interval). 
The -t flag (plugin timeout) overrides whatever value is calculated and 
simply drops a SIGALRM in check_icmp's knees when the time is up, 
forcing it into the finish() function.

If you run check_icmp with your threshold values and specify -vvv, 
you'll get a printout of the max_completion_time value (in 
microseconds). That should be a good start for things.

> Sorry about my dumb questions, but these are important in my scenario: I
> check ISDN lines (which are backup of leased lines) and it takes some time,
> while an ISDN interface come up and replies (the first X echo packets are
> dropped).
> 

In this scenario, I suppose you want to invoke check_icmp as check_host, 
and specify the redundant line's IP as the second host to check.

> Some data about my system:
> 
> Linux antsz1 2.4.23 #1 SMP Thu Jan 15 17:32:38 CET 2004 i686 unknown
> 
> $Id: check_icmp.c,v 1.5 2005/02/01 07:33:13 stanleyhopcroft Exp $
> 
> Nagios-plugins 1.4
> 
> 
> Tanks in advance your reply!
> 
> Bye, Tamas!
> 
> 
> 
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Nagiosplug-help mailing list
> Nagiosplug-help at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> ::: Please include plugins version (-v) and OS when reporting any issue. 
> ::: Messages without supporting info will risk being sent to /dev/null
> 

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer




More information about the Help mailing list