Forum Discussion
Gregory_Gerard_
Nimbostratus
Jun 18, 2005How do I detect if a pool is down in an iRule?
Use Case:
pool is down
Current behavior:
I have an http profile setup that sends back an impersonal redirect to the client.
Desired behavior:
I'd lik...
Al_Carandang_11
Nimbostratus
Mar 05, 2007I am trying the follwowing rule
rule sorry_test {
when LB_FAILED {
log local0.err "ERR: Load Balancing failed for [virtual name] Pool: [LB::server] Client: [IP::remote_addr]
HTTP::redirect "http://sorry.domain.com/sorry.html"
}
}Now when I make a request to the virtual immediately after shutting down the webserver I get an empty reply from the server and I get the following entry in /var/log/ltm:
Mar 5 16:47:02 tmm tmm[1028]: Rule sorry_test : ERR: Load Balancing failed for testvip Pool: test_pool Client: 10.1.1.1
Mar 5 16:47:02 tmm tmm[1028]: 011f0007:3: http_process_state_header_xfer - Invalid action EV_SINK_HEADER during ST_HTTP_XFER_HEADERSSo it appears to have triggered the LB_FAILED event but the HTTP:redirect did not get executed.
Then a few seconds later when the monitor marks the pool member down, I get the correct redirect the response to my HTTP request and I get the following in /var/log/ltm
Mar 5 16:47:03 testbip mcpd[1119]: 01070638:3: Pool member 10.2.2.2:80 monitor status down.
Mar 5 16:47:04 tmm tmm[1028]: Rule sorry_test : ERR: Load Balancing failed for testvip Pool: test_pool Client: 10.1.1.1
Mar 5 16:47:04 tmm tmm[1028]: 011f0007:3: http_process_state_header_xfer - Invalid action EV_SINK_HEADER during ST_HTTP_XFER_HEADERSIn this case, the LB_FAILED event was triggered and the HTTP::redirect was executed.
So my questions are:
1. Why does the HTTP::redirect not get executed in the first instance?
2. What does the EV_SINK_HEADER error message mean?
-Al
- Walter_KacynskiDec 08, 2014
Cirrostratus
I think you want to use LB::down and then perform the redirect. I haven't tested this.
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
