REST API query to VSQL and OData OpenAPI debug logging
search cancel

REST API query to VSQL and OData OpenAPI debug logging

book

Article ID: 141747

calendar_today

Updated On:

Products

CA Performance Management - Usage and Administration DX NetOps

Issue/Introduction

How can I convert the REST API query into the equivalent VSQL query sent to Vertica to retrieve the information.

How can logging to track OpenAPI Odata queries be enabled and reviewed?

How to debug OpenAPI Odata queries using Data Aggregator (DA) logging.

Environment

Release : 21.2, 22.2

Component : IM Reporting / Admin / Configuration

Resolution

This information can be obtained from the OpenAPI debug. 

How to debug what vertica query OpenAPI is making to the database.

Add the following lines to /opt/IMDataAggregator/apache-karaf-<version>/etc/org.ops4j.pax.logging.cfg and save.

21.2.1 and earlier:

log4j.category.com.ca.im.odata.vertica.impl.SQLRepositoryClientBase=DEBUG,sift
log4j.additivity.com.ca.im.odata.vertica.impl.SQLRepositoryClientBase=FALSE


21.2.2 and later:

log4j2.logger.SQLRepositoryClientBase.name = com.ca.im.odata.vertica.impl.SQLRepositoryClientBase
log4j2.logger.SQLRepositoryClientBase.level = DEBUG
log4j2.logger.SQLRepositoryClientBase.additivity = false
log4j2.logger.SQLRepositoryClientBase.appenderRef.sift.ref = sift


Run the odata query again.

Check the /opt/IMDataAggregator/apache-karaf-<version>/data/log/odata-services.impl.log file for the SQL call being made.

Or run re.sh on the DA.