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

**URL:** <https://community.wowza.com/t/httprovider-that-returns-server-vhost-application-appinstance-stream-conn-counts/84>\
**Category:** Wowza Developer Dojo\
**Tags:** wowza-streaming-server-java-api\
**Created:** [November 13, 2009, 10:31am UTC](https://community.wowza.com/t/httprovider-that-returns-server-vhost-application-appinstance-stream-conn-counts/84 "2009-11-13T10:31:23Z")\
**Posts on this page:** 11\
**Page:** 2

<div class="post-metadata">

**Author:** ![Fernando\_Mendoza](https://avatars.discourse-cdn.com/v4/letter/f/97f17d/32.png) [@Fernando\_Mendoza](https://community.wowza.com/u/Fernando_Mendoza)\
**Post date:** [October 25, 2011, 9:17pm UTC](https://community.wowza.com/t/httprovider-that-returns-server-vhost-application-appinstance-stream-conn-counts/84/21 "2011-10-25T21:17:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Fernando\_Mendoza](https://avatars.discourse-cdn.com/v4/letter/f/97f17d/32.png) [@Fernando\_Mendoza](https://community.wowza.com/u/Fernando_Mendoza)\
**Post date:** [October 25, 2011, 9:22pm UTC](https://community.wowza.com/t/httprovider-that-returns-server-vhost-application-appinstance-stream-conn-counts/84/22 "2011-10-25T21:22:47Z")

</div>

> 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

---

<div class="post-metadata">

**Author:** ![Roni\_Sambiangga](https://avatars.discourse-cdn.com/v4/letter/r/e9c0ed/32.png) [@Roni\_Sambiangga](https://community.wowza.com/u/Roni_Sambiangga)\
**Post date:** [April 14, 2010, 6:02pm UTC](https://community.wowza.com/t/httprovider-that-returns-server-vhost-application-appinstance-stream-conn-counts/84/23 "2010-04-14T18:02:33Z")

</div>

Dear Charlie (and everyone else 🙂 )

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? 😕

Thank you.

---

<div class="post-metadata">

**Author:** ![Roni\_Sambiangga](https://avatars.discourse-cdn.com/v4/letter/r/e9c0ed/32.png) [@Roni\_Sambiangga](https://community.wowza.com/u/Roni_Sambiangga)\
**Post date:** [April 15, 2010, 10:00am UTC](https://community.wowza.com/t/httprovider-that-returns-server-vhost-application-appinstance-stream-conn-counts/84/24 "2010-04-15T10:00:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Roni\_Sambiangga](https://avatars.discourse-cdn.com/v4/letter/r/e9c0ed/32.png) [@Roni\_Sambiangga](https://community.wowza.com/u/Roni_Sambiangga)\
**Post date:** [April 21, 2010, 11:25am UTC](https://community.wowza.com/t/httprovider-that-returns-server-vhost-application-appinstance-stream-conn-counts/84/25 "2010-04-21T11:25:19Z")

</div>

Hello there…

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

for examples:

```auto
<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. 😉

Thank you

---

<div class="post-metadata">

**Author:** ![Xiaoqing\_Li](https://avatars.discourse-cdn.com/v4/letter/x/7c8e57/32.png) [@Xiaoqing\_Li](https://community.wowza.com/u/Xiaoqing_Li)\
**Post date:** [May 17, 2010, 3:47am UTC](https://community.wowza.com/t/httprovider-that-returns-server-vhost-application-appinstance-stream-conn-counts/84/26 "2010-05-17T03:47:05Z")

</div>

I’ve create a webservice refer to [http://community.wowza.com/t/-/52](http://community.wowza.com/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?

---

<div class="post-metadata">

**Author:** ![Xiaoqing\_Li](https://avatars.discourse-cdn.com/v4/letter/x/7c8e57/32.png) [@Xiaoqing\_Li](https://community.wowza.com/u/Xiaoqing_Li)\
**Post date:** [May 17, 2010, 10:58am UTC](https://community.wowza.com/t/httprovider-that-returns-server-vhost-application-appinstance-stream-conn-counts/84/27 "2010-05-17T10:58:26Z")

</div>

please help me

---

<div class="post-metadata">

**Author:** ![Jason\_Dolan](https://avatars.discourse-cdn.com/v4/letter/j/ecae2f/32.png) [@Jason\_Dolan](https://community.wowza.com/u/Jason_Dolan)\
**Post date:** [November 27, 2010, 10:32pm UTC](https://community.wowza.com/t/httprovider-that-returns-server-vhost-application-appinstance-stream-conn-counts/84/28 "2010-11-27T22:32:08Z")

</div>

How would I make a .php page with this code?. I just want a simple stats page. I noticed there is no \<php? in the code and I don’t know.

Just looking for code I can paste into a file and name it stats.php and it will get stats from Wowza media server 2.2

Thanks for any help.

---

<div class="post-metadata">

**Author:** ![Jason\_Dolan](https://avatars.discourse-cdn.com/v4/letter/j/ecae2f/32.png) [@Jason\_Dolan](https://community.wowza.com/u/Jason_Dolan)\
**Post date:** [November 28, 2010, 1:46am UTC](https://community.wowza.com/t/httprovider-that-returns-server-vhost-application-appinstance-stream-conn-counts/84/29 "2010-11-28T01:46:05Z")

</div>

I have tried that.

I get this error:

Parse error: syntax error, unexpected ‘}’ in /var/www/stats.php on line 14

Then I took out the bottom } and tried again and I get this:

[PHP]\<?php

$xml = simplexml\_load\_file(“wowzaip:8086/connectioncounts”);

//var\_dump($xml);

foreach ($xml-\>Application as $item) {

$tmp = (string) $item-\>Name;

echo $tmp."  
";

foreach ($item-\>ApplicationInstance as $item2) {

$roomName = (string) $item2-\>Name;

$Connections = (string) $item2-\>ConnectionsCurrent;

echo $roomName.": “.$Connections.”  
";

}

}

?\>[/PHP]

[PHP]Warning: simplexml\_load\_file() [function.simplexml-load-file]: I/O warning : failed to load external entity “wowzaip:8086/connectioncounts” in /var/www/stats.php on line 2

Warning: Invalid argument supplied for foreach() in /var/www/stats.php on line 5[/PHP]

---

<div class="post-metadata">

**Author:** ![Jason\_Dolan](https://avatars.discourse-cdn.com/v4/letter/j/ecae2f/32.png) [@Jason\_Dolan](https://community.wowza.com/u/Jason_Dolan)\
**Post date:** [November 28, 2010, 1:39pm UTC](https://community.wowza.com/t/httprovider-that-returns-server-vhost-application-appinstance-stream-conn-counts/84/30 "2010-11-28T13:39:56Z")

</div>

OK I understand.

I will have a look on there.

I don’t understand why Wowza doesn’t come with a web panel for showing stats in a simple manner. For example in FMS you can see everything running in detail from the admin panel without all this XML rubbish in the browser.

I did lots of searches on Google,But I can’t find any web panels for Wowza.

I think it’s a really good Media Server, it’s got better than FMS, but still lacks a decent admin panel. ☹

---

<div class="post-metadata">

**Author:** ![Jason\_Dolan](https://avatars.discourse-cdn.com/v4/letter/j/ecae2f/32.png) [@Jason\_Dolan](https://community.wowza.com/u/Jason_Dolan)\
**Post date:** [November 29, 2010, 2:53pm UTC](https://community.wowza.com/t/httprovider-that-returns-server-vhost-application-appinstance-stream-conn-counts/84/31 "2010-11-29T14:53:51Z")

</div>

Ok Richard, That’s good news 🙂 Thanks for letting me know.

[Previous page](https://community.wowza.com/t/httprovider-that-returns-server-vhost-application-appinstance-stream-conn-counts/84.md?page=1)
