For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Frank_J_104756's avatar
Frank_J_104756
Historic F5 Account
Sep 25, 2007

testing external connectivity

Is there a way within the irule to test the server I'm going to redirect to? Basically I want to redirect to http://redirectserver.com if certain criteria are met but only if that server is up and responding. The redirect server may (or may not) be located on the LTM running the irule.

3 Replies

  • Deb_Allen_18's avatar
    Deb_Allen_18
    Historic F5 Account
    Well, technically, no....

    ...but if the redirect target server has a single static IP, you *could* define it as a member of a pool, apply an HTTP monitor, and verify status in an iRule before issuing the redirect...

    
    pool FallbackTestPool {
       member :80
       monitor send  recv 

    
    rule RedirectIfFallbackUP {
      when  {
        if {[LB::status pool FallbackTestPool member  80] != "up"} {
          HTTP::redirect "..."
        } else {
          
        }
      }
    }

    HTH

    /deb
  • Frank_J_104756's avatar
    Frank_J_104756
    Historic F5 Account
    is there a way to test the status of a pool itself not the individual members ?
  • Frank_J_104756's avatar
    Frank_J_104756
    Historic F5 Account
    heard back from Deb...way to do this is

     

    if {[active_members $CookiePool] > 0} {

     

     

    thanks again Deb!!!!!