Logging additional outbound HTTP connection details

Document ID : KB000012891
Last Modified Date : 14/02/2018
Show Technical Document Details
Question:

 

How can I log additional details about outbound HTTP connections such as Keep-alive time, connection ID, connection lease/release?

Answer:

 

1. Add or modify the cluster-wide property log.levels:

 

For versions 9.1 and above- Navigate to Tasks -> Global Settings -> Manage Cluster-Wider Properties 

For versions 9.1 and below-  Navigate to Tasks -> Manage Cluster-Wider Properties

 

1.png

 

 

2. Change the value to the below and click OK:

 

com.l7tech.common.http.prov.apache.level = FINEST 

httpclient.wire.header.level = FINEST 

httpclient.wire.content.level = FINEST 

com.l7tech.server.policy.assertion.level = FINEST 

org.apache.commons.httpclient.level=FINE 

 

 2.png

 

3. Next you'll have to configure your log sink:

 

For versions 9.1 and above-  Navigate to Tasks -> Logging and Auditing -> Manage Log/Audit Sinks

For versions 9.1 and below-   Navigate to Tasks -> Manage Log/Audit Sinks

 

*You can add the details to the main ssg log or optionally another configured log sink*

 

a. Edit the desired log sink

b. On  the Basic Settings tab set the Severity Threshold to ALL

c. Next to Filters click the ‘Add’ button and select Categories ‘Audits’ and ‘Gateway Log’. Click OK to save the changes.

 

 3.png

 

4. Setup a sample policy that performs and outbound route from the Gateway. For testing purposes you can simply use a Route via HTTP(S) assertion to http://www.ca.com :

 

4.png

 

 

5. Additional details will now be logged:

 

5.png

Additional Information:

 

This should NOT be enabled in production or for long periods of time as this will fill up the logs quickly.