Wowza Community

Per Instance connection stats on the REST API

Hi there I made a question before in regards to not being able to see per instance connection stats.

I tried to test out the REST api to see if it can filter for instance connections and its just application wide like the admin

ie

curl -X GET --header ‘Accept:application/json; charset=utf-8’ http://localhost:8087/v2/servers/defaultServer/vhosts/defaultVHost/applications/testlive/monitoring/current

I found this HTTP provider, but its a pretty big XML body and it can’t filter for just the instance.

http://localhost:8086/connectioncounts

Can the REST api have a filter path added to it or can it be customised to do so ?

Do I need to make a custom http provider up instead ?

Hi,

I think the connectioncounts HTTP Provider should work. You can add the ?flat query parameter to flatten out the XML, e.g.

http://[wowza-ip]:8086/connectioncounts?flat
<WowzaStreamingEngine>
<Stream vhostName="_defaultVHost_" applicationName="live" appInstanceName="myinst" streamName="camera1.stream" sessionsFlash="0" sessionsCupertino="1" sessionsSanJose="0" sessionsSmooth="0" sessionsRTSP="0" sessionsMPEGDash="0" sessionsTotal="1"/>
<Stream vhostName="_defaultVHost_" applicationName="live" appInstanceName="_definst_" streamName="camera2.stream" sessionsFlash="0" sessionsCupertino="0" sessionsSanJose="0" sessionsSmooth="0" sessionsRTSP="0" sessionsMPEGDash="0" sessionsTotal="0"/>
</WowzaStreamingEngine>

The source code is available here for you to modify if needed.

Paul