Merge pull request #468 from mrueg/fix-prom

Fix prometheus output
pull/469/head
Igor Chubin 4 years ago committed by GitHub
commit 08c0667c47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -16,7 +16,7 @@ def _render_current(data):
current_condition = data["current_condition"][0]
for field in EXPORTED_FIELDS:
try:
output.append("%s(forecast=\"0h\") %s" % (field, current_condition[field]))
output.append("%s{forecast=\"0h\"} %s" % (field, current_condition[field]))
except IndexError:
pass
@ -37,7 +37,7 @@ def _render_current(data):
def render_prometheus(data):
"""
Convert `data` into Prometheus format
and return it as sting.
and return it as string.
"""
return _render_current(data)

Loading…
Cancel
Save