Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
code share

Interface Failsafe Monitor

Problem this snippet solves:

Another slick solution for a couple of common requirement in high performance environments: To fail over immediately when a physical network connection fails connectivity, or if the number of active members in a trunk falls below the configured minimum.

The first sample supports individual interface monitoring. The second supports the more complex trunk management.

How to use this snippet:

http://devcentral.f5.com/Default.aspx?tabid=63&articleType=ArticleView&articleId=166

Monitor Source: Interface Failsafe only

#!/bin/bash
# (c) Copyright 2007 F5 Networks, Inc.
# Kirk Bauer 
# 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=`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...
echo "up"
exit 0

Monitor Source: Interface Failsafe w/Trunk Minumum Active Members support

Comments on this Snippet
Comment made 2 months ago by dtn 55

b interface show ?

0
Comment made 2 months ago by dtn 55

Anyone know how to get the trunk status in version 13 ?

0
Comment made 1 week ago by dyobbs 145

nice kirk, do you have such code that monitors the bandwidth interface?

1