iRule to Log When Pool Member does not Respond to HTTP Request
Hi,
We're currently trying to troubleshoot an application issue and are using an HSL iRule to send logs to Splunk to help us. The iRule we're using works for most circumstances, however we're not sure how to ensure a log gets created in the event the F5 is able to create a TCP connection to the pool member, but the pool member never responds to the subsequent HTTP request that is sent over that TCP connection (ie. failure of processing by the pool member).
Right now, the iRule will successfully send a log to Splunk when a connection is handled by the F5 and passed through to the pool member and the pool member sends a response. The HTTP_RESPONSE event is the trigger to send the log in this case.
The iRule fails to send any logs if there is never a HTTP_RESPONSE received. The event we're currently using to try and catch the error condition is LB_FAILED, but in reading many posts on this event I suspect this will only fire if the TCP connection fails and doesn't relate at all to the HTTP request that uses the TCP connection as transport.
Not having a great deal of experience with iRules, I was hoping someone could suggest how best to alter our approach to also trigger a log message when the pool member does not respond to the HTTP request?
Current logic:
- At clientside TCP connection time, create timestamp
- When the HTTP request comes through, collect specific header values
- If the HTTP request gets a response, collect status, and some stats
- Send log to Splunk
- End
- If LB_FAILED event fires
- Send log to Splunk
- End
- If any other condition (ie. no HTTP_RESPONSE and no LB_FAILED), no log message gets created
Please let me know if there's more info needed to assist and thanks in advance for any help offered.