Forum Discussion
mlamutt_62697
Nimbostratus
Feb 17, 2012Display a maintenance page when a GTM pool member is disabled
Hi all,
I am trying to create an Irule that will display a maintenance page (or custom 404 for each LTM) when a GTM pool member is disabled.
Here is some background:
We are running 3 ltm/gtm combo units, where the GTMs are synced, but the LTMs are not. We have found that when we disable a GTM pool member to route traffic to the other 2 members, we are still getting a small set of users that are still hitting the disabled site. These requests are coming from sources that are using hardcoded LTM Virtual Server IPs. We do not want to force these users to a "live" datacenter, but we do want to display a custom page maintenance page. Is this possible? I started working on this and came up with this failed attempt:
when HTTP_REQUEST {
if { not {[active_members -list ] contain "GTM member Address" }} {
HTTP::respond 200 content "
"HTML text here"
log local0. " GTMPool member disabled"
}
}
Thanks,
Mike
3 Replies
- hoolio
Cirrostratus
Can you try this instead where 1.1.1.1 is the IP you want to look for?
if { not [matchclass [active_members -list ] equals 1.1.1.1]} {
Aaron - mlamutt_62697
Nimbostratus
When I use "equals" I get the following error in the logs:
TCL error: site_KA_check - can't use non-numeric string as operand of "!" while executing "if { not {[active_members -list ] equals "xxx.xxx.xxx.xxx" }} { HTTP::respond 200 content "
I get a similar error when I use the following: ] "xxx.xxx.xxx.xxx"
I also added in a line to show what the active members are, and they are from the LTM pool list, not the GTM pool list. Is there a way pull in the GTM members in a LTM Irule? Is what I am trying even possible? - mlamutt_62697
Nimbostratus
From what I am reading it is not possible to make a direct query from an LTM irule to the. Is it possible to run a TMSH command in an Irule? If soO I could do something like this:
tmsh show gtm pool $1 detail |grep disabled -B 4 |grep "Pool Member"
Is this possible?
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
