Forum Discussion
Samir_Jha_52506
Noctilucent
Slight modified existing iRule. you can write something like below....
when RULE_INIT {
Change to "1" to enable debugging log statements
set static::Poolxyz_select_debug 0
}
when HTTP_REQUEST {
if {[string tolower [HTTP::host]] contains "api-dev" } {
switch -glob [string tolower [HTTP::uri]] {
"/someuri" { pool XYZ }
default { pool big_pool }
}
if { $static::Pool_select_debug eq 1 } {
log local0. "[IP::client_addr] with URI of [HTTP::uri] went to XYZ Pool"
}
}
}
Wackitron_36350
Jul 23, 2018Altocumulus
Thank You for the quick response. It looks like this above IRule is working, I do not see the failures on the Statistics Tab. But on the /var/log/ltm, It is hard to trace the URI being redirected to diff pool. Because Other URIs which we did not mention in the Irule also logged as IP with /xyz or /someuri went to the XYZ Pool. It would be easier if we set up a variable for the Pool.
Thank You again for the help.