Forum Discussion
George_33482
Mar 10, 2012Nimbostratus
iRule pool selection after checking
Hello,
Kindly i need some assistance to complete part of the iRule. i have a LC and i want to select a pool member based on source address. But first i want to check if the pool member is up before, otherwise i will select the whole default pool.
part of the iRule is:
when CLIENT_ACCEPTED {
if { [IP::addr [IP::client_addr] equals 10.10.10.10] } {
if {[check if the pool member 1.1.1.1 is up }{ ----------<<<<<< how to write it?
pool default_pool member 1.1.1.1
} else {
pool default_pool }
}
Do i need another function LB::SELECTED to make it work.
Regards,
George
- nitassEmployeecan you try LB::status?
- Ian_SmithRet. EmployeeTry something like:
set p my_pool_name set m my_pool_member_ip:port if { [active_members $p] > "0" } { if { [lsearch -exact [active_members -list $p] $m] } { pool $p member $m } else { pool $p } }
- George_33482NimbostratusThank you. I will try the code.
- Chris_MillerAltostratusIf you can't do active_members, can you do priority group activation?
- George_33482NimbostratusHi Chris,
- George_33482Nimbostratus
Hello,
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