Wowza Community

HTTProvider that returns server, vhost, application, appInstance, stream conn. counts

There are several HTTProvider examples with full source here:

http://www.wowza.com/community/c/-/10

Try these:

http://www.wowza.com/community/t/-/84

http://www.wowza.com/community/t/-/60

You have to modify one of /conf/VHost/ HostPort /HTTProviders lists, add your HTTProvider.

Richard

Total Connections is at that moment, how many connection there are. If 5 clients are connected at the moment this number will be 5.

ConnectionTotalAccepted is cumulative, since the server was last started. If 20 clients connect successfully since the server was started, this number will be 20.

If you are looking looking at a Load Balancer Listener, which is the server that clients connect to get redirected to edge server (Load Balance Senders) servers, you will see rejected connections because that is how the Load Balancer works: it rejects connections, sends back reject code 302 to the client with the information on which edge to connect to. JW Player and Flowplayer are designed to handle this. They then connect to the edge which accepts the connection.

Richard

One way is to modify the HTTProvider so that it only outputs the data you want, in which case you could provide a querystring with app name to filter on. See this post for how to parse querystring:

http://www.wowza.com/community/t/-/245

Another way is to take the whole output and use an xml parser to extract. Here is a couple of user post that explore that with php.

http://www.wowza.com/community/t/-/34374#3

Richard

A Wowza admin is in development. But I don’t have a time frame for its release.

Richard

I’m not sure about the Wowza admin, but it’s not imminent.

Richard

Hello,

How is possible to extract on xml only information about one application, for example:

http://[wowza.url]:8086/connectioncounts?application=test

to show:

<Application>
  <Name>test</Name> 
  <Status>loaded</Status> 
<ConnectionsCurrent>2</ConnectionsCurrent> 
  <ConnectionsTotal>3</ConnectionsTotal> 
  <ConnectionsTotalAccepted>3</ConnectionsTotalAccepted> 
</Application>

Only information about what application name i need.

Thanks

Hello Charly,

I am using this feature now to build my own admin panel.

But I was looking at something, I have an application with multiple streampoints, but I always get this:

<Application>
  <Name>test</Name> 
  <Status>loaded</Status> 
  <TimeRunning>1454.528</TimeRunning> 
  <ConnectionsCurrent>2</ConnectionsCurrent> 
  <ConnectionsTotal>3</ConnectionsTotal> 
  <ConnectionsTotalAccepted>3</ConnectionsTotalAccepted> 
  <ConnectionsTotalRejected>0</ConnectionsTotalRejected> 
  <MessagesInBytesRate>78872.0</MessagesInBytesRate> 
  <MessagesOutBytesRate>2.0</MessagesOutBytesRate> 
- <ApplicationInstance>
  <Name>_definst_</Name> 
  <TimeRunning>1454.504</TimeRunning> 
  <ConnectionsCurrent>2</ConnectionsCurrent> 
  <ConnectionsTotal>3</ConnectionsTotal> 
  <ConnectionsTotalAccepted>3</ConnectionsTotalAccepted> 
  <ConnectionsTotalRejected>0</ConnectionsTotalRejected> 
  <MessagesInBytesRate>78872.0</MessagesInBytesRate> 
  <MessagesOutBytesRate>2.0</MessagesOutBytesRate> 
- <Stream>
  <Name>alpha</Name> 
  <SessionsFlash>0</SessionsFlash> 
  <SessionsCupertino>0</SessionsCupertino> 
  <SessionsSmooth>0</SessionsSmooth> 
  <SessionsRTSP>0</SessionsRTSP> 
  <SessionsTotal>0</SessionsTotal> 
  </Stream>
- <Stream>
  <Name>omega</Name> 
  <SessionsFlash>0</SessionsFlash> 
  <SessionsCupertino>0</SessionsCupertino> 
  <SessionsSmooth>0</SessionsSmooth> 
  <SessionsRTSP>0</SessionsRTSP> 
  <SessionsTotal>0</SessionsTotal> 
  </Stream>
  </ApplicationInstance>
  </Application>

Is it possible to break up the mountpoints so that I have for each own the bytes in and out?

I can’t really figure out what definst does in this context?

Ah thanks, that wasn’t very clear, but it seems to work now yes!

That option is perfect because now I can monitor per publishpoint the IO data. Thanks!

thanks Richard,

without the AuthenticationMethod it works.

But I’ve changed the folliìowing section:

com.wowza.wms.http.HTTPConnectionCountsXML

connectioncounts*

none

Thanks again for your answer, you have helped me to bypass a serious problem for me.

ciao

Dave

Hi ffsdff,

We can help you with your request.

Please contact us: support[@]wmconsulting.info

Regards,

Alejandro

add

[php]

<?php [/php] at the beginning and [php] ?>

[/php]

at the end ?

Shamrock

Note the wowzaip part, you need to change this to the IP address of your server running Wowza. Please do note PHP is not supported here, although advice can be offered really you do need to source PHP help from a PHP forum.

Shamrock

I am looking for developer who can make connection count that need to display in my website or inside flash player, control bar.

ii have this msg

Fatal error: Call to a member function getElementsByTagName() on a non-object in /home/mexsiden/public_html/mundo/listerns.php on line 9

i guees i need chaneg somethin in the line

$currentlistener = $wms->item(0)->getElementsByTagName(“ConnectionsCurrent”)->item(0)->nodeValue

A Wowza admin is in development. But I don’t have a time frame for its release.

Richard

This its a excellent news for all i hope soon for this moment

Dear Charlie (and everyone else :slight_smile: )

I’m a newbie with Wowza Media Server, and I need to do some monitoring for the server performances. From what I’ve read and understood in this forum, I tried to use http://[wowza-ip-address]:8086/connectioncounts to get the number of connections to the server. But I got the following response in the browser:

“This XML file does not appear to have any style information associated with it.”

Can you tell me what does it mean? :confused:

Thank you.

OK, thanks Richard for answer…

anyway, is it possible for us to modify the HTTPProvider and/or HTTPConnectionCountsXML class?

where can the source code be founded? thanks

Hello there…

I wanna ask about the “connectioncounts” request to the HTTProvider. I still wondering how exactly the calculation works?

for examples:

<WowzaMediaServer>
  <ConnectionsCurrent>2</ConnectionsCurrent>
  <ConnectionsTotal>64</ConnectionsTotal>
  <ConnectionsTotalAccepted>64</ConnectionsTotalAccepted>
  <ConnectionsTotalRejected>0</ConnectionsTotalRejected>
  <MessagesInBytesRate>14.0</MessagesInBytesRate>
  <MessagesOutBytesRate>841.0</MessagesOutBytesRate>
  &#8722; <VHost>
     <Name>_defaultVHost_</Name>
     <TimeRunning>39147.57</TimeRunning>
     <ConnectionsLimit>0</ConnectionsLimit>
     <ConnectionsCurrent>2</ConnectionsCurrent>
     <ConnectionsTotal>64</ConnectionsTotal>
     <ConnectionsTotalAccepted>64</ConnectionsTotalAccepted>
     <ConnectionsTotalRejected>0</ConnectionsTotalRejected>
     <MessagesInBytesRate>14.0</MessagesInBytesRate>
     <MessagesOutBytesRate>841.0</MessagesOutBytesRate>
    &#8722; <Application>
       <Name>securestreaming</Name>
       <Status>loaded</Status>
       <TimeRunning>4613.597</TimeRunning>
       <ConnectionsCurrent>2</ConnectionsCurrent>
       <ConnectionsTotal>12</ConnectionsTotal>
       <ConnectionsTotalAccepted>12</ConnectionsTotalAccepted>
       <ConnectionsTotalRejected>0</ConnectionsTotalRejected>
       <MessagesInBytesRate>14.0</MessagesInBytesRate>
       <MessagesOutBytesRate>841.0</MessagesOutBytesRate>

  1. the “total connection” in the , what exactly does it count? is it based on daily accesses? what does the total means? is there any time limit?

  2. between the and the what is the different of ConnectionTotalAccepted? why it’s different?

  3. I tried to use the loadBalancingTool before and the number of the rejected connection was increasing, why/how that could be happen? because in the loadBalanceTool test, the status was all connected. I thought the loadBalancingTool module is used to test the server connection for the media access.

OK, that’s for now… waiting for your help there. :wink:

Thank you

I’ve create a webservice refer to http://www.wowza.com/community/t/-/52

how can I build a function in webservice return the result like to access http://[wowza-ip-address]:8086/connectioncounts?flat, is to use com.wowza.wms.mediacaster.MediaCasterStreamManager?

some example code will be very appreciated! I’m new to wowza and java.

I can use Wowza IDE.

I want the webservice can tell me a specified stream exists or not, or has been published?

please help me