Forum Discussion

jkstraw_44238's avatar
jkstraw_44238
Icon for Nimbostratus rankNimbostratus
Apr 20, 2007

Tracking requests and responses

Hi,

 

 

I am working with an iRule provided by System Engineer at F5. The iRule was designed to give us the same information our custom apache log gives us (we are moving from Apace to F5).

 

 

Here is the Custom Apache Log:

 

 

CustomLog /opt/apache/logs/ssl_request_log "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T %{JSESSIONID}C %{SSL_PROTOCOL}x %{SSL_CIPHER}x %D"

 

 

and here is the iRule I was provided:

 

 

when HTTP_REQUEST {

 

set http_request_time [clock clicks -milliseconds]

 

log local0. "Client IP: [IP::remote_addr], requesting: [HTTP::method]/[HTTP::host][HTTP::uri], browser: [HTTP::header User-Agent], Referer: [HTTP::header exists Referer], HTTP version [HTTP::version], JSESSION Cookie: [HTTP::cookie exists JSESSIONID], SSL: [SSL::cipher name]/[SSL::cipher version]/[SSL::cipher bits]"

 

}

 

 

when HTTP_RESPONSE {

 

set http_response_time [ clock clicks -milliseconds ]

 

log local0. "HTTP status: [HTTP::status], Response Size: [HTTP::payload length], Duration: [expr $http_response_time - $http_request_time] "

 

}

 

 

 

The iRule seems to provide all the information - but it logs it on two separate lines with no unique identifier in each entry to correlate the data.

 

 

Does anyone know of a way to insert a unique value that would tie together the http_request and http_response lines?

 

 

Thanks

12 Replies