I’m trying to get an external monitor working and not having much luck. This virtual server is meant to do per-packet UDP load balancing across two pool members. The health check’s intent is to SSH into the pool members, run a script local to the pool member, and gauge the response to determine if the pool member should be marked available. Here’s my setup:
Virtual server listening for UDP on all ports:
ltm virtual /Common/siem_gateway_vs {
destination /Common/172.22.237.100:0
ip-protocol udp
mask 255.255.255.255
pool /Common/siem_gateway_pool
profiles {
/Common/siem_udp { }
}
translate-address enabled
translate-port disabled
vlans {
/Common/syslog
}
vlans-enabled
}
A pool applied to the virtual server with two members:
ltm pool /Common/siem_gateway_pool {
members {
/Common/172.22.237.244:0 {
address 172.22.237.244
}
/Common/172.22.237.245:0 {
address 172.22.237.245
}
}
}
The members:
ltm node /Common/172.22.237.244 {
address 172.22.237.244
}
ltm node /Common/172.22.237.245 {
address 172.22.237.245
}
External monitor:
ltm monitor external /Common/splunk_forwarder {
defaults-from /Common/external
destination *:22
interval 5
run /Common/siem_da_healthcheck
time-until-up 0
timeout 16
}
And the script it runs:
!/bin/sh
remove IPv6/IPv4 compatibility prefix (LTM passes addresses in IPv6 format)
IP=`echo ${1} | sed ‘s/::ffff://’`
PORT=${2}
set the pid file location and name
PIDFILE=“/var/run/`basename ${0}`.${IP}.${PORT}.pid”
kill off the last instance of this monitor if hung and log current pid
if [ -f $PIDFILE ]
then
echo “EAV exceeded runtime needed to kill ${IP}:${PORT}” | logger -p local0.error
kill -9 `cat $PIDFILE` > /dev/null 2>&1
fi
echo “$$” > $PIDFILE
send request & check for expected response
ssh splunkf5@${IP} -i /config/ssh/ssh_host_dsa_key /home/splunkf5/healthcheck.sh 2>&1 > /dev/null
mark node UP if expected response was received
if [ $? -eq 0 ]
then
echo “UP”
fi
rm -f $PIDFILE
exit
I’m unable to get the F5 to even attempt an SSH connection with the health monitor above applied to the pool, or directly to the nodes themselves.
I suspect it may have something to do with having a wildcard port on the pool member, but the script shouldn’t need the port to connect as it is specifying an SSH command. Any thoughts as to how I can get this to work?