diff --git a/plugins/wowza/wowza-media-server b/plugins/wowza/wowza-media-server index 81fee466..d732687d 100755 --- a/plugins/wowza/wowza-media-server +++ b/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 = {}