Log HTTP Transaction Using iRule
|
Applied version
*Take note of every syntax with (‘) single-quote or (“) double-quote characters, copy-paste might not work. |
Log HTTP Transaction Using iRule
(1) Creating iRule for logging http transaction
You can use iRule to log the HTTP transactions passing through a Standard virtual server (VIP) with HTTP profile.
- Timestamp for every request, and state.
- TCP connection setup
- BIG-IP process state
- Summary of HTTP requests and responses (in clear text)
- *Example use case: troubleshooting performance issue.
iRule “irule_log_http_transaction”
- iRule, line 1-30 (Figure 1)
- iRule, line 30-59 (Figure 2)
- Filter: Client address 192.168.201.1
(2) Examining the captured logs
- Raw LTM log (Figure 1)
- Transaction log (Figure 2)
- tail -f /var/log/ltm
- sed -e ‘s/^.*\(transaction\)/\1/;tx;d;:x’ /var/log/ltm > /var/tmp/log_http_transaction.txt
- CLIENT_ACCEPTED: Client connected to Virtual Server
- CLIENT_DATA: Payload received from client
- HTTP_REQUEST: Complete HTTP request has been fully parsed
- SERVER_CONNECTED: BIG-IP connected to Pool Member
- HTTP_REQUEST_SEND: HTTP request is about to be sent to Pool Member
- SERVER_DATA: Payload received from server
- HTTP_RESPONSE: Complete HTTP response has been fully parsed
- HTTP_RESPONSE_RELEASE: HTTP response is about to be sent to Client
0 Comments