Pat_Fiorino_287
Apr 19, 2007Historic F5 Account
Apache style logging on BIG-IP
I am trying to implement logging on BIG-IP similar to an Apache Custom 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"
Here is a list restating the same:
- Time of request
- Duration of request in milliseconds, or nanoseconds
- HTTP response code (200, 302, 404, 500, etc)
- Response size in bytes
- URL accessed
- IP address of client
- Agent string of browser
- SSL protocol used
- SSL encryption algorithm used
- HTTP method (GET, POST, etc)
- HTTP protocol (HTTP 1.0, HTTP 1.1)
- Referrer URL
- Value of JSESSIONID client cookie
Ultimately we will use an external log server.
I came up with the following for testing:
when HTTP_REQUEST {
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 {
log local0. "HTTP status: [HTTP::status], Response Size: [HTTP::payload length]"
}
Is there an easy way to log Duration of Request?