Forum Discussion

BenT's avatar
Icon for Altostratus rankAltostratus
Apr 11, 2011

Change httpclass to conditional irule

I have a site that we currently use 3 httpclasses for,



1. Redirect / to /blah


2. Send /hum to pool_b


3. Send /bug to pool_c




Lately, they have been wanting the entire site to be redirected to another page while they perform maintenance, so we have httpclass 4.




4. Match all and send to




Simple enough we just insert httpclass 4 to the top of the class list.




But they are wanting rule 4 added and removed alot, at all times of day and night. And I'm starting to get crabby about it.




Is there a way I can have them just add a file to their server that the F5 is checking for, and if it exists, the redirect rule reigns supreme and I get to sleep through the night? I considered a pool preference with a custom monitor to the goaway file, but that wouldn't negate the httpclasses or redirects.




So now I'm thinking irule may be the way, but I'm not sure how to set the conditional for 4, and how to make it overrule 1, 2, and 3. Any thoughts?


3 Replies

  • You could add a reverse monitor which looks for a 200 response to a maintenance page URI like /maintenance. And then add a fallback URL to a custom HTTP profile.



    If the monitor succeeds, it marks the pool member down. If all members are down, then LTM will send a redirect to the fallback host URL.



  • BenT's avatar
    Icon for Altostratus rankAltostratus
    Is there a way to make the monitor look at an external site? I like the reverse monitor idea, but they have 3 pools with 4 servers in each pool. For your suggestion to work they will need to enable the maintenance URI on every member of every pool. The is external of their site, and if I can hook the monitor to the availablilty of that URL it would be perfect.
  • LTM cannot dynamically resolve a hostname to an IP address in a stock monitor. You could create an external monitor that does this using curl. Here are a couple of examples: