Skip to content

Commit

Permalink
update metrics init rules
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkralidis committed May 23, 2024
1 parent 6160719 commit aaee51a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions wis2-gdc-monitoring/metrics-collector/metrics_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,12 @@ def init_metrics() -> None:
METRIC_INFO.info({
'centre_id': CENTRE_ID,
'url': API_URL,
'subscribed_to': f'{gb_centre_id}'
'subscribed_to': gb_centre_id
})

METRIC_CONNECTED_FLAG.labels(
centre_id=gb_centre_id, report_by=CENTRE_ID).inc(1)

METRIC_DOWNLOADED_ERRORS_TOTAL.labels(gb_centre_id, CENTRE_ID).inc(0)

with open(CENTRE_ID_CSV) as fh:
reader = csv.DictReader(fh)
for row in reader:
Expand All @@ -166,7 +164,6 @@ def init_metrics() -> None:
METRIC_FAILED_TOTAL.labels(*labels).inc(0)
METRIC_CORE_TOTAL.labels(*labels).inc(0)
METRIC_RECOMMENDED_TOTAL.labels(*labels).inc(0)
METRIC_KPI_PERCENTAGE_OVER80_TOTAL.labels(*labels).inc(0)


def collect_metrics() -> None:
Expand Down

0 comments on commit aaee51a

Please sign in to comment.