Forum Discussion
jasona_40790
Aug 23, 2012Nimbostratus
iRule that redirects to Sorry Pool when pool is down
When all of the webservers in a pool are down, I want my users to be directed to the "SorryPage" server pool that will display a maintenance/down page. I've been reading through the forums and I thi...
hooleylist
Aug 29, 2012Cirrostratus
Hi Jason,
Can you try this version which assigns a pool in all cases and logs the results?
when CLIENT_ACCEPTED {
set sorry_debug 1
set default_pool [LB::server pool]
}
when HTTP_REQUEST {
if {[active_members $default_pool] < 1} {
if {$sorry_debug}{log local0. "[IP::client_addr]:[TCP::client_port]: Using sorry pool for [HTTP::uri]"}
HTTP::uri /
pool sorrypool
} else {
if {$sorry_debug}{log local0. "[IP::client_addr]:[TCP::client_port]: Using pool $default_pool for [HTTP::uri]"}
pool $default_pool
}
}
when SERVER_CONNECTED {
if {$sorry_debug}{log local0. "[IP::client_addr]:[TCP::client_port]: Connected to [LB::server] - [IP::server_addr]:[TCP::server_port]"}
}
Aaron
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