From 5156b9e58946e55a7b838690f0c63d721f4016c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20R=C3=BCger?= Date: Wed, 10 Jun 2020 23:30:15 +0200 Subject: [PATCH] prometheus: Proper help format --- lib/view/prometheus.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/view/prometheus.py b/lib/view/prometheus.py index f00e9b6..da5d8c8 100644 --- a/lib/view/prometheus.py +++ b/lib/view/prometheus.py @@ -31,16 +31,18 @@ def _render_current(data): current_condition = data["current_condition"][0] for field in EXPORTED_FIELDS: try: - output.append("# %s\n%s{forecast=\"0h\"} %s" % - (EXPORTED_FIELDS[field][0], + output.append("# HELP %s %s\n%s{forecast=\"0h\"} %s" % + (EXPORTED_FIELDS[field][1], + EXPORTED_FIELDS[field][0], EXPORTED_FIELDS[field][1], current_condition[field])) except IndexError: pass for field in EXPORTED_FIELDS_DESC: try: - output.append("# %s\n%s{forecast=\"0h\", description=\"%s\"} 1" % - (EXPORTED_FIELDS_DESC[field][0], + output.append("# HELP %s %s\n%s{forecast=\"0h\", description=\"%s\"} 1" % + (EXPORTED_FIELDS_DESC[field][1], + EXPORTED_FIELDS_DESC[field][0], EXPORTED_FIELDS_DESC[field][1], current_condition[field])) except IndexError: