For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Jeff_92092's avatar
Jeff_92092
Icon for Nimbostratus rankNimbostratus
Dec 09, 2013

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

  • 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