diff --git a/create_index.py b/create_index.py index 00aa1ef..bf094f4 100644 --- a/create_index.py +++ b/create_index.py @@ -3,7 +3,7 @@ cluster_id = os.getenv("CLUSTER_ID") # Configuration folder_path = '/app/metrics' -s3_path=f'https://s3.amazonaws.com/metrics.oscar.grycap.net/{cluster_id}' +s3_path=f'https://s3.amazonaws.com/metrics.oscar.grycap.net/{cluster_id}/' assets_base_url = 'https://s3.amazonaws.com/metrics.oscar.grycap.net/assets' # Local path to assets OUT_PATH="/app/ui/" diff --git a/metrics_prom.py b/metrics_prom.py index 5ab310d..587a89f 100644 --- a/metrics_prom.py +++ b/metrics_prom.py @@ -66,7 +66,6 @@ def extract_metrics(cluster_services): for svc in cluster_services: svc_vo = svc["vo"] svc_name = svc["name"] - print("Service: ", svc_name) if svc_vo!="" and svc_vo == VO: result = {} @@ -88,7 +87,6 @@ def extract_metrics(cluster_services): else: cpu_usage_query = get_sync_query(svc_name) result = query(cpu_usage_query) - print(result) metrics = result["data"]["result"] if len(metrics) > 0: for m in metrics: @@ -98,7 +96,7 @@ def extract_metrics(cluster_services): ######## MAIN ########## if __name__ == "__main__": - + print("[*] Getting metrics from Prometheus DB") try: oscar_client = Client(OSCAR_CLUSTER_AUTH) except: