Forum Discussion
Leslie_South_55
Oct 17, 2008Nimbostratus
Using LB_FAILED and change the URI w/o 302
I am trying to use the 'when LB_FAILED' to send requests a pool just for apologies. The issue is that the requests coming into the VS have crazy long URI strings like '/ABC/def/g/hij/klmno/' and my s...
Leslie_South_55
Oct 20, 2008Nimbostratus
Here is the rule with mods for my environment
when LB_FAILED {
log local0. "[IP::client_addr]:[TCP::client_port]: Request to pool failed, [LB::server pool]"
Check if this request was not generated from the maintenance page using the HTTP referer header
if {not ([HTTP::header value referer] ends_with "/apologies.htm")}{
log local0. "[IP::client_addr]:[TCP::client_port]: Referer wasn't the maintenance page. Rewriting URI to maintenance page."
HTTP::uri "/"
}
Send request to the apologies pool
LB::reselect pool pool_apologies_http
log local0 "[IP::client_addr]:[TCP::client_port]: Reselecting member from the apologies pool"
}
and here are my logs
Rule rule_apologies_http-referrer : 10.20.45.9:2756: Request to pool failed, pool_prod
Rule rule_apologies_http-referrer : 10.20.45.9:2756: Referer wasn't the maintenance page.
01220001:3: TCL error: Rule rule_apologies_http-referrer - wrong args: should be "log"
Rule rule_apologies_http-referrer : 10.20.45.9:2756: Request to pool failed, pool_prod
Rule rule_apologies_http-referrer : 10.20.45.9:2756: Referer wasn't the maintenance page.
01220001:3: TCL error: Rule rule_apologies_http-referrer - wrong args: should be "log"
Rule rule_apologies_http-referrer : 10.20.45.9:2757: Request to pool failed, pool_prod
Rule rule_apologies_http-referrer : 10.20.45.9:2757: Referer wasn't the maintenance page.
01220001:3: TCL error: Rule rule_apologies_http-referrer - wrong args: should be "log"
Rule rule_apologies_http-referrer : 10.20.45.9:2756: Request to pool failed, pool_prod
Rule rule_apologies_http-referrer : 10.20.45.9:2756: Referer wasn't the maintenance page.
01220001:3: TCL error: Rule rule_apologies_http-referrer - wrong args: should be "log"
Rule rule_apologies_http-referrer : 10.20.45.9:2757: Request to pool failed, pool_prod
Rule rule_apologies_http-referrer : 10.20.45.9:2757: Referer wasn't the maintenance page.
01220001:3: TCL error: Rule rule_apologies_http-referrer - wrong args: should be "log"
Rule rule_apologies_http-referrer : 10.20.45.9:2756: Request to pool failed, pool_prod
Rule rule_apologies_http-referrer : 10.20.45.9:2756: Referer wasn't the maintenance page.
Rule rule_apologies_http-referrer : 10.20.45.9:2757: Request to pool failed, pool_prod
Rule rule_apologies_http-referrer : 10.20.45.9:2757: Referer wasn't the maintenance page.
Rule rule_apologies_http-referrer : 10.20.45.9:2756: Request to pool failed, pool_prod
Rule rule_apologies_http-referrer : 10.20.45.9:2756: Referer wasn't the maintenance page.
Rule rule_apologies_http-referrer : 10.20.45.9:2757: Request to pool failed, pool_prod
Rule rule_apologies_http-referrer : 10.20.45.9:2757: Referer wasn't the maintenance page.
Rule rule_apologies_http-referrer : 10.20.45.9:2756: Request to pool failed, pool_prod
Rule rule_apologies_http-referrer : 10.20.45.9:2756: Referer wasn't the maintenance page.
Rule rule_apologies_http-referrer : 10.20.45.9:2757: Request to pool failed, pool_prod
Rule rule_apologies_http-referrer : 10.20.45.9:2757: Referer wasn't the maintenance page.
Rule rule_apologies_http-referrer : 10.20.45.9:2757: Request to pool failed, pool_prod
Rule rule_apologies_http-referrer : 10.20.45.9:2757: Referer wasn't the maintenance page.
Rule rule_apologies_http-referrer : 10.20.45.9:2758: Request to pool failed, pool_prod
Rule rule_apologies_http-referrer : 10.20.45.9:2758: Referer wasn't the maintenance page.
01220001: repeated 8 times
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