Pinging from a specific interface


#1

I need to be able to ping from a specific interface for Nagios.

i.e. ping -I

Does anyone know of anyway to make Nagios do this1?


#2

Hi

Neither the standard check_ping or check_icmp plugins have that ability, however there is a check_ping.pl script that uses the Net::Ping perl module. You could use that, but you would need to modify check_ping.pl to enable it to take advantage of the bind($local_addr) function within the perl module, which appears to do what you require. See hannes-schulz.de/Projects/nagios/check_ping.pl to download the check script.

HTH

/S


#3

Strides, thanks for the help! What i ended up doing was:

$USER1$/check_icmp -s -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5

and this seems to be working, Any reason that this would not be working and I am tricking myself ;)?