Forum Discussion

AngryCat_52750's avatar
AngryCat_52750
Icon for Nimbostratus rankNimbostratus
Apr 13, 2012

logging external redirect error

We want to create a VS to have our applications point to a internal address abc.example.com and have that redirect to an external vendor.

 

 

I get the redirect part but if the external vendor is down, the server making the request will get the error not the F5 ltm right?

 

 

Is there a way of getting the errors so the LTM can log it?

 

  • If LTM issues an HTTP 30x redirect to an externally hosted site, it can't track the result of the client's subsequent request. If you want to have LTM monitor the state of a host, you could configure it in a pool and add a monitor. The caveat with this is that you'd need to hard code the IP address(es) for the external site in the pool. If you wanted to resolve the hostname to an IP address dynamically, you could create an external monitor to do this:

     

     

    http://devcentral.f5.com/wiki/AdvDesignConfig.TemplateForExternalLtmMonitors.ashx

     

     

    Aaron
  • great suggestion.. but i dont think this solution is going to work for us. We get charged per request to that external vendor. If we have a health check running to that IP, its going to be too costly..

     

     

    Thanks for the idea though.. i will put it in my drawer for future use..
  • Within HTTP there isn't a way to track the subsequent request of a redirect if it's to a different host.

     

     

    Aaron
  • just wondering if replacing host header and logging in LB_FAILED event is usable (instead of redirection).

    e.g.

    74.125.235.31 is www.google.com.sg

    [root@ve1023:Active] config  b virtual bar list
    virtual bar {
       snat automap
       pool foo
       destination 172.28.19.79:80
       ip protocol 6
       rules myrule
       profiles {
          http {}
          tcp {}
       }
    }
    [root@ve1023:Active] config  b pool foo list
    pool foo {
       members 74.125.235.31:80 {}
    }
    [root@ve1023:Active] config  b rule myrule list
    rule myrule {
       when HTTP_REQUEST {
       HTTP::header replace Host "www.google.com.sg"
    }
    
    when LB_FAILED {
       log local0. "LB_FAILED is triggered"
    }
    }
    
    [root@ve1023:Active] config  ssldump -Aed -nni 0.0 port 80
    New TCP connection 1: 172.28.19.251(53125) <-> 172.28.19.79(80)
    1334382564.8509 (0.0011)  C>S
    ---------------------------------------------------------------
    GET / HTTP/1.1
    User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
    Host: 172.28.19.79
    Accept: */*
    
    ---------------------------------------------------------------
    
    New TCP connection 2: 172.28.19.80(53125) <-> 74.125.235.31(80)
    1334382564.8579 (0.0069)  C>S
    ---------------------------------------------------------------
    GET / HTTP/1.1
    User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
    Host: www.google.com.sg
    Accept: */*
    
    ---------------------------------------------------------------