Kyle_S
Sep 14, 2012Nimbostratus
APM - Adding a working iRule to an APM iRule event
I have this iRule that works on sending requests to different pools based on URI keywords. It works great but i am now trying to incorporate it into the APM Access Policy. I am using the iRule editor but it doesn't like the format of the code. How do I trigger the ACCESS_POLICY_AGENT_EVENT for APM?
Here is the working iRule:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/" -
"/myabc/*" -
"/claims/*" -
"/client/*" -
"/claimsdesktop/*" {pool Pool_new}
"/services/*" {pool Pool_app}
"/infoapp/*" {pool Pool_bo}
default {pool Pool_legacy}
}
}
This is the ACCESS_POLICY_AGENT_EVENT i am trying to add:
when ACCESS_POLICY_AGENT_EVENT {
if {[ACCESS::policy agent_id] == "decide"} {