OK, I found how to setup the Request Logging but it doesn't seem to be working for me. I know I'm not doing something right just haven't figured it out yet.
I do have the iRule working but now I'm trying to figure out how I can get it to only log for the URL that I want and not every URL that comes through the VS. do you have an idea how I can accomplish this?
This is the iRule I am using:
when HTTP_REQUEST {
set CLIENT_ADDR [IP::client_addr]
set XFF [HTTP::header X-Forwarded-For]
set ID "[TCP::local_port][expr { int(100000000 * rand()) }]"
set REQUEST_RECEIVE [clock clicks -milliseconds]
set HST "[HTTP::host]"
set URI "[HTTP::uri]"
}
when HTTP_REQUEST_SEND {
set REQUEST_SEND [clock clicks -milliseconds]
set REQUEST_WAIT [expr {$REQUEST_SEND - $REQUEST_RECEIVE}]
log local0. "SRC:$CLIENT_ADDR XFF:$XFF ID:$ID HST:$HST'/'$URI"
}
when HTTP_RESPONSE {
set RESPONSE_TIME [expr {[clock clicks -milliseconds] - $REQUEST_SEND}]
log local0. "SRC:$CLIENT_ADDR XFF:$XFF ID:$ID HST:$HST$URI - HTTP[HTTP::status] $RESPONSE_TIME\ms/$REQUEST_WAIT\ms [LB::server addr]"
}
I want to somehow tell this to log only if the URL is ex. website1.com log if it is website2.com ignore as they will both come into the same VS on the F5.