Skip to content
Snippets Groups Projects
Commit cde4891e authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Monitoring component:

- Fixed hardcoded table name in SQL statement
parent 780f5022
No related branches found
No related tags found
2 merge requests!54Release 2.0.0,!47Fixes for Device, Monitoring and OFC'22 tests
......@@ -592,7 +592,7 @@ class MonitoringServiceServicerImpl(MonitoringServiceServicer):
LOGGER.info('GetInstantKpi error: KpiID({:s}): not found in database'.format(str(kpi_id)))
response.kpi_id.kpi_id.uuid = "NoID"
else:
query = f"SELECT kpi_id, timestamp, kpi_value FROM monitoring WHERE kpi_id = '{kpi_id}' " \
query = f"SELECT kpi_id, timestamp, kpi_value FROM {METRICSDB_TABLE} WHERE kpi_id = '{kpi_id}' " \
f"LATEST ON timestamp PARTITION BY kpi_id"
data = self.metrics_db.run_query(query)
LOGGER.debug(data)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment