Forum Discussion
GTM Question
Is it possible to make GTM decisions based on number of LTM pool member availability? Consider GTM and LTM are in single device.
2 Replies
- Vijay_E
Cirrus
Possible if you use an iRule.
Something like this:
when DNS_REQUEST { if { [active_members pool_test] < 1 } { pool POOL_TEST_Fallback } else { pool pool_test } - Jinshu
Cirrus
I have found an alternate solution to do this.
Configure below script as external monitor. Create new monitor using this external script and append it in the VIP along with your existing health monitor. Change the 'Availability Requirement ' to 'All'.
Above script monitor the availability of the pool members. If it is less than 3, then it will change the wide-ip lb method.
!/bin/sh pidfile="/var/run/$MONITOR_NAME.$1..$2.pid" Send signal to the process group to kill our former self and any children as external monitors are run with SIGHUP blocked if [ -f $pidfile ] then kill -9 -`cat $pidfile` > /dev/null 2>&1 fi echo "$$" > $pidfile pool=Enter Pool Name minup=3 virtual=Enter VIP name wideip=Enter Wide IP Name upmembers=`tmsh show /ltm pool $pool members |grep "Current Active Members" |awk -F" : " '{ print $2 }'` if [ $upmembers -ge $minup ] then rm -f $pidfile state=`tmsh show /gtm wideip $wideip | grep "Availability" |awk -F" : " '{ print $2 }'` if [ $state == "available" ] then logger -p local0.info -t MONITOR-ALERT "Pool $pool Monitor UP - changing the lb method to global-availability" tmsh modify /gtm wideip $wideip pool-lb-mode global-availability fi echo "up" else rm -f $pidfile state=`tmsh show /gtm wideip $wideip | grep "Availability" |awk -F" : " '{ print $2 }'` if [ $state == "available" ] then logger -p local0.info -t MONITOR-ALERT "Pool $pool Monitor DOWN - changing the lb method to ratio" tmsh modify /gtm wideip $wideip pool-lb-mode ratio fi echo "up" fi-Jinshu
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com