Forum Discussion
Scot_85536
Nimbostratus
Dec 04, 2009Irule winner Chetan Bhatt's entry
Apparently nobody checks the validity of the irules once posted? Chetan Bhatt's irule had three typos that prevents it from being valid. It is missing one quote and two escapes in front of other quotes. I'm anxious to load it up, looks cool!
10 Replies
- The_Bhattman
Nimbostratus
You can check out the complete irules here
http://devcentral.f5.com/wiki/default.aspx/iRules/Pool__Member__Status__Page_on_a__Virtual__Server_v10.html
http://devcentral.f5.com/wiki/default.aspx/iRules/Pool_Member_Status_Page_on_a_Virtual_Server.html
There already has been some contribution to the original code.
Bhattman - Joel_Moses
Nimbostratus
Couldn't resist. :> - The_Bhattman
Nimbostratus
Nope - Michael_A__Fied
Nimbostratus
Seems like the 9.4.7 version doesn't include handling for HA clusters like the v10 does - any chance that can be added, so the b load statement only happens on the Active node? - The_Bhattman
Nimbostratus
You could replace
!/bin/bash
b pool all |grep "POOL MEMBER" | awk '{sub(":any",":0",$4);print "\""$4"\","}' | sort >/var/class/pool_member_status_list.class
b load
exit 0
with
!/bin/bash
b pool all |grep "POOL MEMBER" | awk '{sub(":any",":0",$4);print "\""$4"\","}' | sort >/var/class/pool_member_status_list.class
if [ "`/bin/ps1`" == "Active" ]; then
b load
fi
exit 0
I hope this helps
Bhattman - milo
Nimbostratus
Is there another command we can use besides "b load" to update the datagroup when the external file changes? I think we ran into a memory issue and lost our config after running the "b load" command. - hoolio
Cirrostratus
Yep:
http://devcentral.f5.com/Default.aspx?tabid=53&forumid=5&tpage=1&view=topic&postid=11704231170423
you do not have to do a full b load
You can get away with toggling one of the attributes on the class. Here's a CodeShare entry that does the trick
http://devcentral.f5.com/wiki/default.aspx/iControl/PingExternalClass.html
Click here
I hope this helps
Bhattman
Aaron - milo
Nimbostratus
Thanks for the quick response. It's going to take me a while to understand how to use the CodeShare entry. In the mean time, can I remove the b load command from the pool member status cron job if I run it after a daily config sync cron job using
bigpipe fo | grep -q "FAILOVER standby" && nice b config sync pull - hoolio
Cirrostratus
If you want to programmatically force a re-read of the external datagroup file, you could create the PingExternalClass Perl script on LTM and then call it from the script you're running from cron.
Aaron - milo
Nimbostratus
I appreciate the Perl script, Hoolio. I didn't realize it would be so easy to implement. It works great.
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects
