Forum Discussion
Ron_130795
Nimbostratus
May 07, 2014iRule to catch 4xx and 5xx errors for specific server in a pool
How do I configure an iRule to catch/log 400 and 500 errors on a specific server in a specific pool. Also, where do I go to look at these logs when they are generated?
example server ip - 10.20...
What_Lies_Bene1
Cirrostratus
May 07, 2014OK, so, something like this;
when HTTP_RESPONSE {
if { [HTTP::status] >= 400 } {
log local0. "[LB::server addr] in Pool:[LB::server pool] returned HTTP status: [HTTP::status]" }
}
Alternatively, if you meant only log this for a specific server;
when HTTP_RESPONSE {
if { ([LB::server addr] equals 10.20.10.100) && ([HTTP::status] >= 400) } {
log local0. “[LB:server addr] in Pool:[LB::server pool] returned HTTP status: [HTTP::status]” }
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects