Forum Discussion
Sorry Page when all the pools associated with the Application is down
I have a query here. The irules works when your default pool is down. I.e it displays sorry page for the main URL. I've many L7 URI pools in my application, So the requirement is that for every URI also it should display the sorry page.
i.e if the main URL is https://abc.apple.com and it has a L7 URI for /payment which which I've different set of nodes.
I want the even https://abc.apple.com/payment should also display the sorry page when the URI pool is down.
Can someone suggest what should be the if condition, to take in account all pools of an application?
- ltwagnonRet. Employee
Can you share the iRule that you have set? Maybe with the iRule shared out, people can take a look and see why it's not working for all URIs. Thanks!
- juhiverma17_320
Nimbostratus
The if condition applied is:
when HTTP_REQUEST { if { [active_members [LB::server pool]] == 0 }
I dont have the Irule handy now.. just sharing the condition part
- ltwagnonRet. Employee
See the iRule from Vijay below...looks like the condition is "when LB_Selected" rather than "when HTTP_Request"
- juhiverma17_320
Nimbostratus
Thanks!! Will try this and let you know how it works..
- Anesh
Cirrostratus
Also take a look at https://devcentral.f5.com/articles/irules-recipe-4-static-maintenance-page-23131
- juhiverma17_320
Nimbostratus
This is the Irule I'm using:
when HTTP_REQUEST { if {[active_members [LB::server pool]] == 0} { switch [HTTP::uri] { "/h_abc.gif" { HTTP::respond 200 content [ifile get "h_abc_gif"] } "/" { HTTP::respond 200 content [ifile get "maintenance_wo_closebtn"] } } } }
This sorry page is a HTML page with images embedded.
I tried to replace the when HTTP_Request with when LB_Selected but it gives error. 01070151:3: Rule [/Common/user-maintenance_rule] error: /Common/user-maintenance_rule:4: error: [command is not valid in current event context (LB_SELECTED)][HTTP::respond 200 content [ifile get "h_abc_gif"] ]
Recent Discussions
Related Content
* 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