From a5b1ec1daadc41a48bbdb5a4fc8b2ac98ff26547 Mon Sep 17 00:00:00 2001 From: Dave Wickham Date: Sat, 7 Oct 2017 23:55:06 +0100 Subject: [PATCH] Update label handling to cope with current prometheus client. --- src/server.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server.py b/src/server.py index 9f2cb2f..5d289e8 100644 --- a/src/server.py +++ b/src/server.py @@ -71,9 +71,9 @@ def main(): g_uptime = server.getUptime() logger.debug('mumble_user_connected: %d' % g_user) logger.debug('mumble_uptime: %d' % g_uptime) - labels = {'server_id': server.id(), 'ice_server': ice_server} - gauges['users'].labels(labels).set(g_user) - gauges['uptime'].labels(labels).set(g_uptime) + label_values = [ice_server, server.id()] + gauges['users'].labels(*label_values).set(g_user) + gauges['uptime'].labels(*label_values).set(g_uptime) time_to_wait = args.interval - (time.time() - t1) if time_to_wait > 0: