Forum Discussion
How to select a pool member in the irules?
Are there a way to select a pool member in stead of a pool in a irules?
I have the following irules which is working as I expected. But i don't want to use pool but pool members. if { [IP::addr [IP::remote_addr] equals 192.168.100.1/32] } { set selected_pool [lsearch -inline [pools -list green] *_datacenter1] } else { set selected_pool [lsearch -inline [pools -list green] *_datacenter2] }
I wish to have something like this. but I haven't figured it out to make it work in the irule editors
if { [IP::addr [IP::remote_addr] equals 192.168.100.1/32] } {
set selected_poolmember [lsearch -inline [poolmembers -list green] *_datacenter1]
} else {
set selected_poolmember [lsearch -inline [poolmembers -list green] *_datacenter2]
}
1 Reply
- Kevin_Stewart
Employee
I can't say that I'm familiar with a pools or poolmembers command, but generally to pick a specific pool member, you'd use the pool command followed by the member attribute. Example.
pool local-pool member 10.70.0.1 80
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