1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 10:39:53 +00:00

Update plugins/wowza/wowza-media-server

-Fix Graph wowza_app_listeners
-Compatibility to python 2.6
This commit is contained in:
Matthias Hähnel 2013-01-21 15:27:26 +01:00 committed by Kenyon Ralph
parent fcc3a6f8be
commit e71641b88f

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python2
#!/usr/bin/python
"""
Plugin to monitor Wowza streaming servers.
@ -83,14 +83,14 @@ tree.parse(f)
f.close()
vhosts = []
for vh in tree.iter("VHost"):
for vh in tree.findall("VHost"):
if vh.find("Name").text not in vhost_exclude:
applications = []
for app in vh.iter("Application"):
for app in vh.findall("Application"):
if app.find("Name").text not in app_exclude:
if app.find("Status").text == "loaded":
clients = []
for client in app.iter("Client"):
for client in app.findall("Client"):
if client.find("IpAddress").text not in client_exclude:
clients.append({"ClientId": client.find("ClientId").text,
"FlashVersion": client.find("FlashVersion").text,
@ -289,7 +289,7 @@ elif plugin_name == "wowza_vhost_uptime":
elif plugin_name == "wowza_app_listeners":
for vh in vhosts:
for app in vh["Applications"]:
print (vh["Name"].strip("/").replace(".","_").replace("-","_"),"_",app["Name"].strip("/").replace(".","_").replace("-","_"),".value ",app["TimeRunning"],sep='')
print (vh["Name"].strip("/").replace(".","_").replace("-","_"),"_",app["Name"].strip("/").replace(".","_").replace("-","_"),".value ",app["ConnectionsCurrent"],sep='')
elif plugin_name == "wowza_app_duration":
alldurations = {}