Forum Discussion
John_Cavell_344
Nimbostratus
Dec 15, 2017Catch-22 problem with health monitor
We are trying to overcome a "catch-22" situation with a load balancer VIP - any suggestions will be appreciated...
The VIP has a pool with 2 member nodes. The health monitor tests a specific URL...
Andy_McGrath
Cumulonimbus
Dec 15, 2017This is not to hard I think, you need to copy your original pool but do not put any monitors on it or put a simple monitor like a TCP or TCP Half Open just to ensure the servers are up.
Then you need an iRule to check default pools active member status:
when CLIENT_ACCEPTED {
Set backup pool name to variable
set backupPool "backup_pool"
if {[active_members [LB::server pool]] < 1} {
if {[active_members $backupPool] > 0} {
log local0.alert "Default pool [LB::server pool] as not active members, forwarding to $backupPool"
pool $backupPool
} else {
log local0.alert "Both default pool [LB::server pool] and $backupPool have no active members. Closing TCP connection"
TCP::close
}
}
}
Backup pool name is set to a variable at the start of the iRule and you can also change the final TCP::close if you wanted to do some other response like a sorry page etc.
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
