DM_5174
Mar 10, 2010Nimbostratus
-- HELP PUTTING MULTIPLE IRULES TOGETHER
Hi All,
I was wondering if I can get the help of all the i-rule gurus here on this site.
We have 3 i-rules that i would like to put together as one, but for some reason
It is not working when I try to consolidate as one i--rule.
Here is the objective of the irule.
I-rule 1. This will send inbound connection to another server pool if the
URL ends with /APPxx
I-Rule 2. This will use the class data-group to only allow IP address that is defined for inbound connections to the WEBLOGIC pool during maintenance window, all other connections from external clients will need to get sent to the maintenance page "http://www.mainsite.com/maintenance/emergencydown.htm".
I-Rule 3. This is an additional monitor that will verify all members in the WEBLOGIC pool are up. If all the hosts are down, users regardless should get sent to the emergency downpage.
PROBLEM: When I consolidate the 3 i-rules together, I-Rule 1 does not seem to work. I connect, but when try to go to /APPxx, I get a error from the LTM that it can not find this directory. Please help, since rule 1 and 2 is most important and needs to work together.
I-RULE 1 Sends inbound connection to APACHE SVR POOL if URL ends with /APP.."
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/APP01*" -
"/APP02*" -
"/APP03*" -
"/APP004*" -
"/APP5*"
{
use pool APACHE-SERVER-POOL
}
default {
use pool WEBLOGIC-SERVER-POOL
}
}
I-RULE 2 Check if client IP is in the datagroup
if {[matchclass [IP::client_addr] equals $::ALLOW-DURING-MAINTENANCE]}{
pool WEBLOGIC-SERVER-POOL
} else {
HTTP::redirect "http://www.mainsite.com/maintenance/sched-maintenance.htm"
}
I-RULE 3 monitor members of pool and if down will send to emergency notification page, will also set the timer to return client to host URL
set stime 10
If the WEBLOGIC POOL is down, redirect to the emergency notification page
if { [active_members WEBLOGIC-SERVER-POOL] < 1 } {
HTTP::redirect "http://www.mainsite.com/maintenance/emergencydown.htm"
}
}
Thank you in advance!