Forum Discussion
Jay_105897
Nimbostratus
Apr 22, 2013Acknowledging disabled Pool Member
I am trying to execute a set of commands when all pool members, of a specified Pool, are either down or disabled. It appears as though the following example only matches pool members that are down and not those that are disabled.
1 when CLIENT_ACCEPTED {
2 if { [active_members http_pool] >= 2 } {
3 pool http_pool
4 }
5 }
Has anyone ever setup an iRule that would acknowledge such?
2 Replies
- What_Lies_Bene1
Cirrostratus
I'm happy to be corrected but I think your best bet here is to use the when LB_FAILED event and select the alternative pool there. - Kevin_Stewart
Employee
You can use the members command to list all of the members of a pool, regardless of monitor status, and then show their status with the LB::status command. Here's an example:when CLIENT_ACCEPTED { foreach x [members -list local-pool] { log local0. "$x = [LB::status pool local-pool member [lindex $x 0] [lindex $x 1]]" } }
One important thing to note is that a failed monitor and a forced down node will result in the same "down" status, while a disabled and enabled member will show as "session_disabled" and "up" respectively. To get more distinction between down and disabled, you have to query from the shell with TMSH.
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