Forum Discussion

Wil_Schultz_101's avatar
Wil_Schultz_101
Icon for Nimbostratus rankNimbostratus
Mar 19, 2007

Maintenance page?

So in the v4 version of the BigIP you used to be able to create virt, rule, pool and also a maintenance page if the given pool in the rule was down. This doesn't seem to be an option on the v9.2.4 so far as I can tell so I am hoping that someone can tell me the best way to implement this...

I'm using irules that look similar to the following:


 switch -glob [string tolower [HTTP::uri]] {
  "/uri1/*" -
  "/uri2/*" -
  "/uri3/*" {
   pool poola
  }
  "/uri4/*" -
  "/uri5/*" -
  "/uri6/*" {
   pool poolb
  }
  "/uri7/*" -
  "/uri8/*" -
  "/uri9/*" {
   pool poolc
  }
  default {
   pool defaultpool
  }
 }

So, if pool a were down I'd like the request to go to "http://maintenance.my.com" but the other pools to serve normally. I've found this in another post but wondering if this is the best way:


when LB_FAILED { 
 switch [LB::server pool] { 
  poola -
  poolb -
  poolc { 
   HTTP::redirect http://maintenance.my.com
  } 
 } 
} 

1 Reply

  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    If what you're looking to do is to test a pool's status before sending traffic there, you can do so by adding a little logic like this:

    
    switch -glob [string tolower [HTTP::uri]] {
      "/uri1/*" -
      "/uri2/*" -
      "/uri3/*" {
        if {[active_members poola] > 0} {
          pool poola
        } else {
          pool fallback_poola
        }
      }
      "/uri4/*" -
      "/uri5/*" -
      "/uri6/*" {
        if {[active_members poolb] > 0} {
          pool poolb
        } else {
          pool fallback_poolb
        }
      }
      "/uri7/*" -
      "/uri8/*" -
      "/uri9/*" {
        if {[active_members poolc] > 0} {
          pool poolc
        } else {
          pool fallback_poolc
        }
      }
      default {
        pool defaultpool
      }
    }