summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-04-21 17:50:40 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-04-21 17:50:40 +0200
commit74303a3633f533640ff95a94ff59dbdb16395b22 (patch)
tree12d5fd1b3be6d5991cbfde801e9d50eff820ce3e
parentcc1bcdcfb2f7de523543f78332807279189d053a (diff)
downloaddabmux-74303a3633f533640ff95a94ff59dbdb16395b22.tar.gz
dabmux-74303a3633f533640ff95a94ff59dbdb16395b22.tar.bz2
dabmux-74303a3633f533640ff95a94ff59dbdb16395b22.zip
Remove get_ident_from_uri from munin stats script
-rwxr-xr-xdoc/stats_dabmux_multi.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/doc/stats_dabmux_multi.py b/doc/stats_dabmux_multi.py
index a47cf8d..05484ae 100755
--- a/doc/stats_dabmux_multi.py
+++ b/doc/stats_dabmux_multi.py
@@ -70,10 +70,6 @@ def connect():
return sock
-def get_id_from_uri(uri):
- proto, _, port = uri.partition('://*:')
- return "zmq_" + proto + "_" + port
-
if len(sys.argv) == 1:
sock = connect()
sock.send("values\n")
@@ -82,10 +78,10 @@ if len(sys.argv) == 1:
munin_values = ""
for ident in values:
v = values[ident]['inputstat']
- munin_values += "multigraph buffers_{ident}\n".format(ident=get_id_from_uri(ident))
+ munin_values += "multigraph buffers_{ident}\n".format(ident)
munin_values += "high.value {}\n".format(v['max_fill'])
munin_values += "low.value {}\n".format(v['min_fill'])
- munin_values += "multigraph over_underruns_{ident}\n".format(ident=get_id_from_uri(ident))
+ munin_values += "multigraph over_underruns_{ident}\n".format(ident)
munin_values += "underruns.value {}\n".format(v['num_underruns'])
munin_values += "overruns.value {}\n".format(v['num_overruns'])
@@ -101,7 +97,7 @@ elif len(sys.argv) == 2 and sys.argv[1] == "config":
munin_config = config_top
for conf in config['config']:
- munin_config += config_template.format(ident=get_id_from_uri(conf))
+ munin_config += config_template.format(ident)
print(munin_config)