Forum Discussion
6 Replies
- Pradeep_more_10NimbostratusYou can use i rule to redirect to url which contain sorry/ maintenance page You can setup sorry page locally or on server other then pool member Server end:- one server containing sorry page should be up f5 end :- when all pool member are down, it should redirect to sorry page.( with help of irule ) Eg:- when HTTP_REQUEST { if { [active_members [LB::server pool]] == 0 } { HTTP::redirect "http://sorry page or maintenance page" } } } for more ref :- https://devcentral.f5.com/s/articles/hosting-sorry-error-or-maintenance-pages-on-big-ip-ltm-with-irules https://devcentral.f5.com/s/feed/0D51T00006i7PeFSAU http://www.resdevops.com/category/networking/f5/
an example can be found here, it does a bit more then you request and doesn't trigger on all pool members down, but if you understand it then that shouldn't be an issue:
https://devcentral.f5.com/articles/irule-maintenance-windows
- Vitaliy_SavransNacreous
You can try:
when LB_FAILED {
if { [active_members [LB::server pool]] < 1 } { HTTP::fallback "http://host.domain.com/redirect.html" } }
- nitassEmployee
there are a couple of options such as what bigip version are you running (9.x/10.x or 11.x)?, where is maintenance page (server or bigip)?, would you like to change url shown on a browser?
if maintenance page is on server and you just want http redirection, Vitaliy's irule or something like below may be usable.
e.g.
root@(ve11a)(cfg-sync Changes Pending)(Active)(/Common)(tmos) list ltm rule myrule ltm rule myrule { when HTTP_REQUEST { if { [active_members [LB::server pool]] < 1 } { HTTP::redirect "http://www.google.com" } } }
hope this helps.
- Stefan_Magnus_LNimbostratus
I use the redirect method all the time. However my code looks more like this ( == 0 , as in no active members)
Or even:
ltm rule myrule { when HTTP_REQUEST { if { [active_members [LB::server pool]] == 0 } { HTTP::redirect "http://www.google.com" } } }
- Vitaliy_SavransNacreous
another good idea is to keep Maintenance page ( HTML ) as iFile on F5 device and use an iRule:
when HTTP_REQUEST { if {[active_members [LB::server pool]] < 1} { HTTP::respond 200 content [ifile get iFile_name] } }