Forum Discussion
tarsier_90410
Nimbostratus
Aug 25, 2009way to list pools?
I am trying to find a way for an irule (9.x LTM) to query for a list of all pools on the system, but so far have not found a way to do so. Is this possible?
Glen_91715
Nimbostratus
Nov 02, 2009Hi,
I've used the above iRule to create a page and add a few bits to it for some prettier reporting, but I have an issue with the way LB::status works.
I have a class file with the strings:
"PoolNamed_One/10.0.0.1:any",
"PoolNamed_Two/10.0.0.2:http",
"PoolNamed_Three/10.0.0.3:webcache",
"PoolNamed_Four/10.0.0.4:3389",
... where this is obtained from:
b pool all member | grep "POOL MEMBER" | awk '{print "\""$4"\","}'
However when using the following the Service ports that are in text do not get translated, i.e:
scan [split $selectedpool "/"] %s%s poolname addrport
scan [split $addrport ":"] %s%d addr port will yield a empty/non-existant variable for $port except in the case of the "PoolNamed_Four/10.0.0.4:3389"
I can changed this to two strings (%s%s) to fill the variable $port, but this creates an error with LB::status
When it gets to "switch -glob [LB::status pool $poolname member $addr $port]" it doesn't match any with text for the Service name.
Else it logs with the following error:
TCL error: Pool_Member_Status_List - can't read "port": no such variable
Thanks
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
