Permalink
Browse files

Update plugins/wowza/wowza-media-server

-Fix Graph wowza_app_listeners
-Compatibility to python 2.6
  • Loading branch information...
1 parent fcc3a6f commit e71641b88f8e6221173c84e36205c2ef08150657 @m4c3 m4c3 committed with kenyon Jan 21, 2013
Showing with 5 additions and 5 deletions.
  1. +5 −5 plugins/wowza/wowza-media-server
@@ -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 = {}

0 comments on commit e71641b

Please sign in to comment.