1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-21 18:41:03 +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. Plugin to monitor Wowza streaming servers.
@ -83,14 +83,14 @@ tree.parse(f)
f.close() f.close()
vhosts = [] vhosts = []
for vh in tree.iter("VHost"): for vh in tree.findall("VHost"):
if vh.find("Name").text not in vhost_exclude: if vh.find("Name").text not in vhost_exclude:
applications = [] 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("Name").text not in app_exclude:
if app.find("Status").text == "loaded": if app.find("Status").text == "loaded":
clients = [] clients = []
for client in app.iter("Client"): for client in app.findall("Client"):
if client.find("IpAddress").text not in client_exclude: if client.find("IpAddress").text not in client_exclude:
clients.append({"ClientId": client.find("ClientId").text, clients.append({"ClientId": client.find("ClientId").text,
"FlashVersion": client.find("FlashVersion").text, "FlashVersion": client.find("FlashVersion").text,
@ -289,7 +289,7 @@ elif plugin_name == "wowza_vhost_uptime":
elif plugin_name == "wowza_app_listeners": elif plugin_name == "wowza_app_listeners":
for vh in vhosts: for vh in vhosts:
for app in vh["Applications"]: 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": elif plugin_name == "wowza_app_duration":
alldurations = {} alldurations = {}