Forum Discussion
hooleylist
May 31, 2011Cirrostratus
As Bhattman said, [IP::server_addr] only works after a serverside connection has been established. You can use [LB::server] in the LB_SELECTED event when a load balancing selection has been made to get the selected server info. Or you can use [IP::server_addr] in or after SERVER_CONNECTED.
Also, if you're using this iRule with an IIS-based application, you should set the path to lowercase before doing a comparison as IIS is case-insensitive for the paths:
when HTTP_REQUEST {
log local0. "Erimo request received"
if { [string tolower [HTTP::path]] equals "/aprimomarketing/login.aspx" } {
log local0. "Erimo request for Aprimo service received. Selecting end server"
pool Node_Web_ESESSMW1432
}
else {
pool wam_erimo_pool
log local0. "Condition not matched. No Aprimo server selected."
}
}
when SERVER_CONNECTED {
log local0. "Connection from [IP::client_addr]:[TCP::client_port] to Aprimo server: [IP::server_addr]:[TCP::server_port] established."
}
Aaron