Logging incoming web requests

Applies to: Denodo 8.0 , Denodo 7.0 , Denodo 6.0
Last modified on: 28 May 2020
Tags: Administration Monitoring Tomcat Web Services

Download document

You can translate the document:

Goal

This document shows how to log incoming web requests and their IPs using the embedded Apache Tomcat configuration files.

Content

Denodo Virtual DataPort has an embedded Apache Tomcat server that is used for the web administration tools and also to deploy published web services. In some cases it will be very useful to store in the logs the accessed URLs.

The way to enable the logging for incoming http requests is different for different versions of the Denodo Platform.

For Denodo Platform 5.5 and earlier versions open

<DENODO_HOME>/resources/apache-tomcat/conf/tomcat.properties

 and change the property

com.denodo.tomcat.http.log 

which by default is set to false to true.

For Denodo Platform 6.0 the file to modify will be

<DENODO_HOME>/resources/apache-tomcat/conf/server.xml

In this file, uncomment the following section that is commented by default:

<Valve className="org.apache.catalina.valves.AccessLogValve"

 directory="../../logs/apache-tomcat"  

 prefix="http_access." suffix=".log"

 pattern="common" resolveHosts="false"/>

For Denodo Platform 7.0 and 8.0 the file to modify will be

<SOLUTION_MANAGER_HOME>/resources/apache-tomcat/conf/server.xml (for the Denodo Solution Manager)

and

<DENODO_HOME>/resources/apache-tomcat/conf/server.xml (for the Denodo Platform).

In these files, uncomment the following section that is commented by default:

<Valve className="org.apache.catalina.valves.AccessLogValve"

 directory="../../logs/apache-tomcat"  

 prefix="http_access." suffix=".log"

 pattern="common" resolveHosts="false"/>

Once the configuration change is performed, for all Denodo versions, restart the Denodo Platform services.

Once the logging is enabled after executing a request against one of the web services hosted on the Denodo Platform, a log file will be created under

<DENODO_HOME>/logs/apache-tomcat called http_access.<DATE>.log

In the file, a new line for each request with the following pattern will be appended:

<IP> - - <DATE> <HTTP Method> <URL Requested> <HTTP Code> <Size>

For example, after browsing to http://<DENODO_HOST>:<PORT>/denodo-restfulws/tutorial, something similar to the following line will be added to the log file:

127.0.0.1 - - [02/Mar/2016:08:44:48 +0100] "GET /denodo-restfulws/tutorial HTTP/1.1" 200 4360

Questions

Ask a question
You must sign in to ask a question. If you do not have an account, you can register here

Featured content

DENODO TRAINING

Ready for more? Great! We offer a comprehensive set of training courses, taught by our technical instructors in small, private groups for getting a full, in-depth guided training in the usage of the Denodo Platform. Check out our training courses.

Training