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:
parent
fcc3a6f8be
commit
e71641b88f
1 changed files with 5 additions and 5 deletions
|
@ -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 = {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue