Forum Discussion
Charles_Harris
Nimbostratus
Dec 12, 2008Health Monitor Min Avail Members
Hi,
I've written a monitor for disabling all of a pool's members should a minimum number be unavailable (all disabled + session states) with the idea that it could be targeted to the po...
John_Alam_45640
Aug 17, 2016Historic F5 Account
Updated version:
when HTTP_REQUEST {
switch [HTTP::uri] {
"/40" {
if { [active_members web_pool_secondary] == 0 } {
log local0. "40% check - no members in pool"
HTTP::respond 200 content "UP"
}
elseif { [active_members web_pool_secondary] >= 4 } {
log local0. "40% check good"
HTTP::respond 200 content "UP"
}
else {
HTTP::respond 503
}
}
"/60" {
if { [active_members web_pool_primary] == 0 } {
log local0. "60% check - no members in pool"
HTTP::respond 200 content "UP"
}
elseif { [active_members web_pool_primary] >= 6 } {
log local0. "60% check good"
HTTP::respond 200 content "UP"
}
else {
HTTP::respond 503
log local0. "60% check fail"
}
}
default {
HTTP::respond 503
log local0. "monitor check error [HTTP::uri]"
}
}
}
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