I know that I have seen an iRule which says if the primary pool hass no active memebers, then send to another pool (kinda like a maintenance page). I searched the forums and code shares and could not find what I am looking for. Can someone point me in the general direction please? Thanks in advance.
You can check to see that there is at least one node in the pool marked up using active_members (Click here![]()
when LB_SELECTED {
if {[active_members my_pool] < 1}{
no nodes available, so set a new pool, send a redirect or send another HTTP response
...
}
}
You could use LB::server pool with active_members to get the active nodes in the currently selected pool:
[active_members [LB::server pool]] < 1
Try searching for active_members for more examples or reply here.
Aaron