Skip to content

Commit

Permalink
Typo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
catttam committed Jul 12, 2024
1 parent 1fd80aa commit ddead2a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion create_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand Down
4 changes: 1 addition & 3 deletions metrics_prom.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
Expand All @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit ddead2a

Please sign in to comment.