Hi Chris,
to use the class command (or any other iRule specific TCL syntax) within an APM policy evaluation, you have to use an iRule Policy Action within VPE.
VPE iRule Action:
- Name: DomainDataGroupCall
- ID: DomainDataGroupCall
iRule Code:
when ACCESS_POLICY_AGENT_EVENT {
if { [ACCESS::policy agent_id] eq "DomainDataGroupCall" } then {
set orig_domain [ACCESS::session data get "session.logon.last.domain"]
if { [set resolved_domain [class match -value $orig_domain equals DG_APM_DOMAIN_LOOKUP]] ne "" } then {
log local0.debug "Resolved Domain: $resolved_domain"
ACCESS::session data set "session.logon.last.domain" $resolved_domain
}
}
}
Cheers, Kai