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 Network Observability

Issue/Introduction

How can we convert the REST API query into the equivalent VSQL query sent to Vertica to retrieve the information?

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

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

Environment

All Supported Releases

Resolution

This information can be obtained from the OpenAPI debug. 

To debug what vertica query OpenAPI is making to the database do the following steps.

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

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 to reproduce the issue.

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

Or run re.sh script on the Data Aggregator.