Merge pull request #1 from turmoni/master
Update label handling to cope with current prometheus client.
This commit is contained in:
commit
4d174a86da
|
@ -71,9 +71,9 @@ def main():
|
||||||
g_uptime = server.getUptime()
|
g_uptime = server.getUptime()
|
||||||
logger.debug('mumble_user_connected: %d' % g_user)
|
logger.debug('mumble_user_connected: %d' % g_user)
|
||||||
logger.debug('mumble_uptime: %d' % g_uptime)
|
logger.debug('mumble_uptime: %d' % g_uptime)
|
||||||
labels = {'server_id': server.id(), 'ice_server': ice_server}
|
label_values = [ice_server, server.id()]
|
||||||
gauges['users'].labels(labels).set(g_user)
|
gauges['users'].labels(*label_values).set(g_user)
|
||||||
gauges['uptime'].labels(labels).set(g_uptime)
|
gauges['uptime'].labels(*label_values).set(g_uptime)
|
||||||
|
|
||||||
time_to_wait = args.interval - (time.time() - t1)
|
time_to_wait = args.interval - (time.time() - t1)
|
||||||
if time_to_wait > 0:
|
if time_to_wait > 0:
|
||||||
|
|
Loading…
Reference in a new issue