Skip to content

Commit

Permalink
Include unit in metric name
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelosthege authored May 20, 2024
1 parent b549c2c commit 4043a8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def __init__(self, ccu_host, ccu_port, auth, gathering_interval, reload_names_in
# Upon request export the seconds since the last successful update.
# This is robust against internal crashes and can be used by the healthcheck.
self.refresh_time = time.time()
self.refresh_age = Gauge("refresh_age", "Seconds since the last successful refresh.", labelnames=["ccu"], namespace=self.METRICS_NAMESPACE)
self.refresh_age = Gauge("refresh_age_seconds", "Seconds since the last successful refresh.", labelnames=["ccu"], namespace=self.METRICS_NAMESPACE)
self.refresh_age.labels(self.ccu_host).set_function(lambda: time.time() - self.refresh_time)

def generate_metrics(self):
Expand Down

0 comments on commit 4043a8c

Please sign in to comment.