1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 14:16:00 +00:00

twemproxy: add python3 support

This commit is contained in:
pboesch 2020-02-03 15:04:06 +01:00 committed by Lars Kruse
parent 4d8456af03
commit 1e81c032d5

View file

@ -41,7 +41,7 @@ def process_data():
if(type(value) == dict): if(type(value) == dict):
total = 0 total = 0
# get server requests # get server requests
for pool_key, pool_value in value.iteritems(): for pool_key, pool_value in value.items():
if(type(pool_value) == dict): if(type(pool_value) == dict):
total += pool_value["requests"] total += pool_value["requests"]
print "requests_"+key+".value"+" "+str(total) print "requests_"+key+".value"+" "+str(total)
@ -52,7 +52,7 @@ def process_config():
print "graph_vlabel requests/s" print "graph_vlabel requests/s"
data = get_stats(); data = get_stats();
for key, value in data.iteritems(): for key, value in data.items():
if(type(value) == dict): if(type(value) == dict):
print "requests_"+key+".label "+key print "requests_"+key+".label "+key
print "requests_"+key+".type COUNTER" print "requests_"+key+".type COUNTER"