By default, the Denodo components store the log files on the local filesystem. However, it is possible to configure them to store the log files on Azure Blob Storage as well. This is useful for Denodo deployments that run on Azure and that are switched off when they are no longer needed. With this feature, the logging information is saved even if the virtual machines are deleted.
This feature was added in Denodo Platform 8.0 update 20220126 and it has been added for the Solution Manager in Denodo 8.0 update 20220815.
To configure the access to Azure Blob Storage, we have to provide the Connection String of the storage account to be used, in order to authenticate the applications’ requests to this storage account.
The Microsoft documentation about how to configure Azure Storage connection strings is available here.
In the Azure portal, in the storage account detail page we can access the connection string value through the Access keys option of Security + networking.
Log4j2.xml file configuration
To store the log files of a Denodo Virtual DataPort server on an S3 bucket you need to modify the file <DENODO_HOME>/conf/vdp/log4j2.xml.
Add the CloudAppender inside the “Appenders” section:
Add the appender to the Root logger:
The following properties control how the logs are stored in Azure Blob Storage:
- azureBlobContainer: the container to use. The appender will attempt to create the container if it does not exist.
- azureBlobNamePrefix: the prefix where each log file will be stored inside the container.
- azureStorageConnectionString: the connection string used to authenticate the applications’ requests to this storage account.
These properties control when the appender will send the logs:
- stagingBufferSize: number of log messages after which the content is written.
- stagingBufferAge: number of minutes after which the content is written. If this property is defined, stagingBufferSize property value is ignored.
NOTE: to log the server start / stop messages, add these log categories in the Loggers section:
<Logger name="server.start" level="info" />
The log4j2.xml files are available in the following paths in a Denodo Platform installation for each type of server:
- Virtual DataPort server: <DENODO_HOME>/conf/vdp/log4j2.xml
- Scheduler server: <DENODO_HOME>/conf/scheduler/log4j2.xml
- Scheduler Index: <DENODO_HOME>/conf/arn-index/log4j2.xml
- Data Catalog: <DENODO_HOME>/resources/apache-tomcat/webapps/denodo-data-catalog/WEB-INF/classes/log4j2.xml
In each case, you will need to stop the corresponding server, make the changes in the file and start the server with the new appender configured.