Skip to content
Snippets Groups Projects
Commit 793f7ffa authored by Waleed Akbar's avatar Waleed Akbar
Browse files

Updated Promtheus URL

- PROM_URL variable is updated with FQDN of Prometheus.
parent 624a1817
No related branches found
No related tags found
2 merge requests!294Release TeraFlowSDN 4.0,!255Resolve "KPI Management Enhancements"
...@@ -32,7 +32,7 @@ from kpi_manager.client.KpiManagerClient import KpiManagerClient ...@@ -32,7 +32,7 @@ from kpi_manager.client.KpiManagerClient import KpiManagerClient
LOGGER = logging.getLogger(__name__) LOGGER = logging.getLogger(__name__)
METRICS_POOL = MetricsPool('KpiValueAPI', 'NBIgRPC') METRICS_POOL = MetricsPool('KpiValueAPI', 'NBIgRPC')
PROM_URL = "http://localhost:9090" PROM_URL = "http://prometheus-k8s.monitoring.svc.cluster.local:9090" # TODO: updated with the env variables
class KpiValueApiServiceServicerImpl(KpiValueAPIServiceServicer): class KpiValueApiServiceServicerImpl(KpiValueAPIServiceServicer):
def __init__(self): def __init__(self):
...@@ -79,7 +79,8 @@ class KpiValueApiServiceServicerImpl(KpiValueAPIServiceServicer): ...@@ -79,7 +79,8 @@ class KpiValueApiServiceServicerImpl(KpiValueAPIServiceServicer):
prom_response = [] prom_response = []
for start_time, end_time in zip(start_timestamps, end_timestamps): for start_time, end_time in zip(start_timestamps, end_timestamps):
for metric in metrics: for metric in metrics:
# print(start_time, end_time, metric) print(start_time, end_time, metric)
LOGGER.debug(">>> Query: {:}".format(metric))
prom_response.append( prom_response.append(
prom_connect.custom_query_range( prom_connect.custom_query_range(
query = metric, # this is the metric name and label config query = metric, # this is the metric name and label config
......
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