LTM: Interface Failsafe
Nathan McMahon and Kirk Bauer bring us another slick solution for a couple of common requirements in high performance environments: To fail over immediately when a single physical network connection ...
Published Mar 05, 2008
Version 1.0Deb_Allen_18
Historic F5 Account
Joined September 25, 2004
Deb_Allen_18
Historic F5 Account
Joined September 25, 2004
Vincent_Li_9688
Jan 05, 2011Historic F5 Account
I have modified the script to avoid potential false failover.
!/bin/bash
Copyright 2007 F5 Networks, Inc.
Kirk Bauer kirk@f5.com
modifed by Vincent Li v.li@f5.com to avoid possible I/O buffer
Pass in each interface to monitor via the Arguments field in the GUI
Collect arguments (first remove IP and port as we don't use those)
shift
shift
interfaces="$*"
b interface show > /tmp/b_interface_show
for i in $interfaces ; do
status=`b interface $i show | tail -1 | awk '{print $2}'`
status=`grep "^ *$i " /tmp/b_interface_show | awk '{print $2}'`
if [ "$status" != "UP" ] ; then
logger -p local0.notice "$MON_TMPL_NAME: interface $i is not up (status: $status)"
exit 1
fi
done
All specified interfaces are up...
logger -p local0.notice "$MON_TMPL_NAME: interface $i is up (status: $status)"
echo "up"
exit 0