updated metrics output for prometheus with a 'riak_' prefix and removed unnecessary colon'

This commit is contained in:
Marcell Jusztin 2016-08-17 14:35:32 +01:00
parent e33d15cc68
commit 38b6d9d4a2

View File

@ -67,7 +67,7 @@ class MetricsHandler(RequestHandler):
for key, value in riak_stats_data.items():
if isinstance(value, (int, float, bool)):
prom_value = float(value)
prom_str = "{}: {}".format(key, prom_value)
prom_str = "riak_{} {}".format(key, prom_value)
yield prom_str
@coroutine