[Nagiosplug-devel] [ nagiosplug-Patches-1499641 ] Specify source address with check_ping

SourceForge.net noreply at sourceforge.net
Wed Jul 5 11:18:48 CEST 2006

Patches item #1499641, was opened at 2006-06-02 17:11
Message generated for change (Comment added) made by tonvoon
You can respond by visiting: 

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Enhancement
Group: None
>Status: Closed
>Resolution: Rejected
Priority: 5
Submitted By: dERMOTH (dermoth)
>Assigned to: Ton Voon (tonvoon)
Summary: Specify source address with check_ping

Initial Comment:
This is a patch I made for check_ping (nagiosplug
1.4.3) to allow to specify source address.

This is very usefull when you have a multi-homed Nagios
server and want to test different routes to the same

Ideally this patch needs some work in autoconf (which I
have no knowledge of) to check for the -I switch and
have some code included in IFDEF's. Since the -I switch
will only be used when needed, this shouldn't break

As you can see below this modified check_ping accepts
an additioal and optional -s switch:

# ./check_ping --help
check_ping (nagios-plugins 1.4.3) 1.50
Copyright (c) 1999 Ethan Galstad
<nagios at nagios.org>Copyright (c) 2000-2004 Nagios
Plugin Development Team
        <nagiosplug-devel at lists.sourceforge.net>

Use ping to check connection statistics for a remote host.

Usage: check_ping -H <host_address> -w <wrta>,<wpl>% -c
                     [-p packets] [-s source_address]
[-t timeout] [-L] [-4|-6]

 -h, --help
    Print detailed help screen
 -V, --version
    Print version information
 -4, --use-ipv4
    Use IPv4 connection
 -6, --use-ipv6
    Use IPv6 connection
-H, --hostname=HOST
   host to ping
-w, --warning=THRESHOLD
   warning threshold pair
-c, --critical=THRESHOLD
   critical threshold pair
-p, --packets=INTEGER
   number of ICMP ECHO packets to send (Default: 5)
-s, --source=IP
   source address
-L, --link
   show HTML in the plugin output (obsoleted by urlize)
 -t, --timeout=INTEGER
    Seconds before connection times out (default: 10)
THRESHOLD is <rta>,<pl>% where <rta> is the round trip
average travel
time (ms) which triggers a WARNING or CRITICAL state,
and <pl> is the
percentage of packet loss to trigger an alarm state.



>Comment By: Ton Voon (tonvoon)
Date: 2006-07-05 10:18

Logged In: YES 


Thank you for your patch. Unfortunately, we will not be using it because it is 
too painful to try and work out if the option is supported in all the various 
distributions of ping (what happens if -I is supported by ping, but is not to 
do with source address?).

If you can provide a patch for check_icmp (the pure C implementation of 
check_ping), we would definitely be interested.



You can respond by visiting: 

More information about the Devel mailing list