Forum Discussion

fubarSUSHI's avatar
fubarSUSHI
Icon for Altocumulus rankAltocumulus
Mar 11, 2014

LTM Hosted maintenance page

I remember seeing a LTM hosted maintenance page that allows you to utilize the same iRule on any VS without having to change the "pool member name". Can anyone point me to the right direction?

Here is an example of what I am looking for: DevCentral>Irules>LTM Maintenance Page Light by The Bhattman

when HTTP_REQUEST {
 sets the timer to return client to host URL
set stime 10

 Use the Host header value for the responses if it's set.  If not, use the VIP address.
if {[string length [HTTP::host]]}{
    set host [HTTP::host]
} else {
    set host [IP::local_addr]
}
 Check if the URI is /maintenance
switch [HTTP::uri] {
    "/maintenance" {

 Send an HTTP 200 response with a Javascript meta-refresh pointing to the host using a refresh time
    HTTP::respond 200 content \
"Maintenance page \
Sorry! This site is down for maintenance." "Content-Type" "text/html"
    return
    }
}

 If the pool_testLB is down, redirect to the maintenance page
if { [active_members pool_testLB] < 1 } {
    HTTP::redirect "http://$host/maintenance"
    return
    }
}

But I thought there was a way to replace "pool_testLB" with a dynamic way to utilize whatever pool member associated to the VS whenever this iRule is managed.