Loading src/kpi_value_api/service/KpiValueApiServiceServicerImpl.py +3 −2 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ from kpi_manager.client.KpiManagerClient import KpiManagerClient LOGGER = logging.getLogger(__name__) 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): def __init__(self): Loading Loading @@ -79,7 +79,8 @@ class KpiValueApiServiceServicerImpl(KpiValueAPIServiceServicer): prom_response = [] for start_time, end_time in zip(start_timestamps, end_timestamps): 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_connect.custom_query_range( query = metric, # this is the metric name and label config Loading Loading
src/kpi_value_api/service/KpiValueApiServiceServicerImpl.py +3 −2 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ from kpi_manager.client.KpiManagerClient import KpiManagerClient LOGGER = logging.getLogger(__name__) 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): def __init__(self): Loading Loading @@ -79,7 +79,8 @@ class KpiValueApiServiceServicerImpl(KpiValueAPIServiceServicer): prom_response = [] for start_time, end_time in zip(start_timestamps, end_timestamps): 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_connect.custom_query_range( query = metric, # this is the metric name and label config Loading