Pierrejn
Feb 06, 2017Nimbostratus
iRule Help Please
I'm trying to combine L7 Load Balancing with sending a maintenance page if the pool/pools are down. Please see below.
Code when HTTP_REQUEST {
if { [class match [string tolower [HTTP::host]] equals _http_pools] } {
pool [class match -value [string tolower [HTTP::host]] equals _http_pools]
}
}
and trying to combine the following
Code when HTTP_REQUEST {
set VSPool [LB::server pool]
if { [active_members $VSPool] < 1 } {
log local0. "Client [IP::client_addr] requested [HTTP::uri] no active nodes available..."
HTTP::respond 200 content "
We'll be back!
IMPORTANT MESSAGE
Please be advised that we are performing a scheduled maintenance on the site you are trying to access. All site access will be unavailable during this maintenance. Service is expected to resume February 4 at 5 a.m. CT
"
}
}