Forum Discussion
feversl_29467
Nimbostratus
May 02, 2014Is there a script that could retrieve WIPs and pools from the GTM ?
I am looking for a way to export of all the F5 load balanced URLs listing the URL that is load balanced, assigned VIP and IPs of the servers that participate in that LB Pool. I have heard that I can use an iControl script to gather this infomation starting with the GTM and then then issue commands against the LTMs to retrieve the pool members associated with each VIP that is referenced by a WIP. Thanks
1 Reply
- StephanManthey
Nacreous
Hi,
here is a one-liner on this subject. Just replace the name of the wideip, please. In my sample I used the wideip of "www.sub.lb-net.bit". Thanks, Stephantmsh list gtm wideip www.sub.lb-net.bit one-line | grep -E -o 'pools \{ ([^ ]+ \{ [^\}]+ \} )+\}' | \ sed -r -e 's/^pools //g' -e 's/(^\{ | \}$)//g' -e 's/\{[^\}]+\}//g' -e 's/[[:space:]]$//g' -e 's/[[:space:]]+/\n/g' | \ awk '{print "tmsh list gtm pool",$1,"one-line"}' | bash +x | grep -E -o 'members \{ ([^ ]+ \{ [^\}]+ \} )+\}' | \ sed -r -e 's/^members //g' -e 's/(^\{ | \}$)//g' -e 's/\{[^\}]+\}//g' -e 's/[[:space:]]$//g' -e 's/[[:space:]]+/\n/g' | \ awk -F ":" '{print "tmsh list gtm server",$1,"virtual-servers \{",$2,"\}"}' 2>/dev/null | bash +x | awk '/destination/ {print $2}' 10.131.131.142:http 10.131.131.141:http
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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