Forum Discussion
Christian_Laute
Nimbostratus
Jul 01, 2016iRule checking Pool is down
Gents,
maybe you can help me out. I need an irule to check the availability of a pool. Usually I used the command
[...]
if { [active_members [LB::server pool]] == 0 }
[...]
but the disadvan...
cjunior
Nacreous
Jul 01, 2016I don't understand what you propose very well, but it might help you:
when HTTP_REQUEST {
set up 0
set down 0
set disabled 0
foreach member [members -list [LB::server pool]] {
set status [LB::status pool [LB::server pool] member [lindex $member 0] [lindex $member 1]]
switch $status {
"up" {
incr up 1
}
"down" {
incr down 1
}
"session_disabled" {
incr disabled 1
}
}
}
log local0. "===> [LB::server pool] members (Active: $up) (Down: $down) (Disabled: $disabled)"
unset up down disabled
}
Regards.
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
