# logging external redirect error

**URL:** <https://community.f5.com/t/logging-external-redirect-error/34805>\
**Category:** Technical Forums\
**Tags:** dev, irules, devops, application-delivery\
**Created:** [April 13, 2012, 4:10pm UTC](https://community.f5.com/t/logging-external-redirect-error/34805 "2012-04-13T16:10:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![AngryCat\_52750](https://avatars.discourse-cdn.com/v4/letter/a/ccd318/32.png) [@AngryCat\_52750](https://community.f5.com/u/AngryCat_52750)\
**Post date:** [April 13, 2012, 4:10pm UTC](https://community.f5.com/t/logging-external-redirect-error/34805/1 "2012-04-13T16:10:52Z")

</div>

We want to create a VS to have our applications point to a internal address [abc.example.com](http://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?

---

<div class="post-metadata">

**Author:** ![hoolio](https://avatars.discourse-cdn.com/v4/letter/h/f6c823/32.png) [@hoolio](https://community.f5.com/u/hoolio)\
**Post date:** [April 13, 2012, 4:52pm UTC](https://community.f5.com/t/logging-external-redirect-error/34805/2 "2012-04-13T16:52:31Z")

</div>

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](http://devcentral.f5.com/wiki/AdvDesignConfig.TemplateForExternalLtmMonitors.ashx)

Aaron

---

<div class="post-metadata">

**Author:** ![AngryCat\_52750](https://avatars.discourse-cdn.com/v4/letter/a/ccd318/32.png) [@AngryCat\_52750](https://community.f5.com/u/AngryCat_52750)\
**Post date:** [April 13, 2012, 6:14pm UTC](https://community.f5.com/t/logging-external-redirect-error/34805/3 "2012-04-13T18:14:32Z")

</div>

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..

---

<div class="post-metadata">

**Author:** ![hoolio](https://avatars.discourse-cdn.com/v4/letter/h/f6c823/32.png) [@hoolio](https://community.f5.com/u/hoolio)\
**Post date:** [April 13, 2012, 8:19pm UTC](https://community.f5.com/t/logging-external-redirect-error/34805/4 "2012-04-13T20:19:56Z")

</div>

Within HTTP there isn’t a way to track the subsequent request of a redirect if it’s to a different host.

Aaron

---

<div class="post-metadata">

**Author:** ![nitass](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/nitass/32/2270_2.png) [@nitass](https://community.f5.com/u/nitass)\
**Post date:** [April 14, 2012, 5:42am UTC](https://community.f5.com/t/logging-external-redirect-error/34805/5 "2012-04-14T05:42:07Z")

</div>

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](http://www.google.com.sg)

```tcl
[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: */*

---------------------------------------------------------------

```
