# How to Setup Wowza Media Server for CasterStats

**URL:** https://community.wowza.com/t/how-to-setup-wowza-media-server-for-casterstats/36565
**Category:** Wowza Developer Dojo
**Created:** [May 8, 2011, 10:35am UTC](https://community.wowza.com/t/how-to-setup-wowza-media-server-for-casterstats/36565 "2011-05-08T10:35:49Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Hazel\_Skeet](https://avatars.discourse-cdn.com/v4/letter/h/e8c25b/32.png) [@Hazel\_Skeet](https://community.wowza.com/u/Hazel_Skeet)
#### Post date: [May 8, 2011, 10:35am UTC](https://community.wowza.com/t/how-to-setup-wowza-media-server-for-casterstats/36565/1 "2011-05-08T10:35:49Z")

</div>

**Wowza Logging Setup**

To use the reporting capabilities of [CasterStats Reporter](http://www.casterstats.com/features_reporter.php), you need to parse streaming server log files.

**[Reporter Image](http://www.casterstats.com/features_reporter.php)**

Wowza logging can be configured in the file log4j.properties located in **[install-dir]/conf/**

To improve performance, we suggest you use **CasterStats** appender (see below) as that is lighter and also contains everything needed. To enable it add **CasterStats** to the list of appenders in the first line of the configuration file and copy and paste the following code:

log4j.rootCategory=INFO, stdout, serverAccess, serverError, casterStats

If you don’t have the appender configuration, here is how it goes:

```auto
[COLOR="green"]# Statistics appender[/COLOR] (to use this appender add "casterStats" to the list of appenders in the first line of this file)
[COLOR="green"]log4j.appender.casterStats=org.apache.log4j.DailyRollingFileAppender
log4j.appender.casterStats.DatePattern='.'yyyy-MM-dd
log4j.appender.casterStats.File=${com.wowza.wms.ConfigHome}/logs/wowzamediaserver_casterstats.log
log4j.appender.casterStats.layout=com.wowza.wms.logging.ECLFPatternLayout
log4j.appender.casterStats.layout.Fields=x-severity,x-category,x-event;date,time,c-client-id,c-ip,c-port,cs-bytes,sc-bytes,x-duration,x-sname,x-stream-id,x-spos,sc-stream-bytes,cs-stream-bytes,x-file-size,x-file-length,x-vhost,x-app,x-appinst,x-ctx,x-comment
log4j.appender.casterStats.layout.OutputHeader=true
log4j.appender.casterStats.layout.QuoteFields=false
log4j.appender.casterStats.layout.Delimeter=tab
log4j.appender.casterStats.layout.CategoryInclude=session,stream
log4j.appender.casterStats.layout.EventExclude=comment[/COLOR]

```

In **CasterStats®** configuration, simply point to **wowzamediaserver\_casterstats.log** or specify the wildcard **wowzamediaserver\_stats\*.log**.

We also highly recommend that you use a separate log file for each application you want to analyze.

**Wowza Real-time Stats Providers Setup**

**[CasterStats® Dashboard](http://www.casterstats.com/features_dashboard.php)** is compatible with the **Wowza HTTPProviders**. They provide you with a web based interface to access real-time stats. **CasterStats®** uses them to visualize your audience in its Dashboard.

**[Dashboard Image](http://www.casterstats.com/images/dashboard1.jpg)**

**CasterStats®** uses two of the providers available from Wowza straight out of the box:

**HTTPServerInfoXML** (com.wowza.wms.http.HTTPServerInfoXML) & **HTTPConnectionInfo** (com.wowza.wms.http.HTTPConnectionInfo).

They are already configured within the default installation. All you have to do is enable password protection by editing the file located in **[install-dir]/conf/admin.password**.

In addition here is [a link](http://www.shamrock.org.uk/WowzaModules/CasterStats/) to a custom HTTP provider which supports all client types (RTMP, RTP and HTTP) and removes the current limitations on accurate client counts.

This HTTP provider was created by Andrew Kennedy from [shamrock.org.uk](http://shamrock.org.uk) and the link takes you to their page where you can download a pdf about the provider and the XMLConnectionCounts.jar file.

**CasterStats® Configuration**

Now you have configured Wowza, you must add the stream in the **CasterStats®** configuration. Wowza has some specific details that you need to be aware of.

In addition to the arbitrary name you can specify in the **General Settings** box, be sure to set correct values in **Technical Settings** box:

- Select WowzaMediaServer in Type

- Be sure to specify the host or IP of your wowza server

- Port for Wowza HTTP Providers is 8086 by default

- Mount should contain the path to your application instance or stream (see examples below)

- (to get very detailed reports):

- (will take all data within that instance):

- (same effect as point a):

- Be sure to set up the username of the HTTP Provider

- And the correct password

---

<div class="post-metadata">

### Author: ![Randall\_Auriemma](https://avatars.discourse-cdn.com/v4/letter/r/85e7bf/32.png) [@Randall\_Auriemma](https://community.wowza.com/u/Randall_Auriemma)
#### Post date: [May 8, 2011, 4:16pm UTC](https://community.wowza.com/t/how-to-setup-wowza-media-server-for-casterstats/36565/2 "2011-05-08T16:16:31Z")

</div>

The screenshots look great. I especially like the geolocation info.

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [September 18, 2011, 3:54pm UTC](https://community.wowza.com/t/how-to-setup-wowza-media-server-for-casterstats/36565/3 "2011-09-18T15:54:50Z")

</div>

Yes, this is configured in /conf/log4j.properties file. You will find a section that is commented out that you just have to uncomment and restart Wowza to enable

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [September 18, 2011, 4:47pm UTC](https://community.wowza.com/t/how-to-setup-wowza-media-server-for-casterstats/36565/4 "2011-09-18T16:47:05Z")

</div>

It is:

```auto
 
_defaultVHost_

```

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [March 2, 2012, 2:38pm UTC](https://community.wowza.com/t/how-to-setup-wowza-media-server-for-casterstats/36565/5 "2012-03-02T14:38:34Z")

</div>

You should also try Casterstats support. I don’t know the answer to this.

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [March 2, 2012, 2:58pm UTC](https://community.wowza.com/t/how-to-setup-wowza-media-server-for-casterstats/36565/6 "2012-03-02T14:58:17Z")

</div>

I see that, and it doesn’t seem right. I think the Casterstats folks wrote that up. I would contact them.

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [March 2, 2012, 2:58pm UTC](https://community.wowza.com/t/how-to-setup-wowza-media-server-for-casterstats/36565/7 "2012-03-02T14:58:43Z")

</div>

These .stream files are placed in the content folder.

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [March 2, 2012, 3:09pm UTC](https://community.wowza.com/t/how-to-setup-wowza-media-server-for-casterstats/36565/8 "2012-03-02T15:09:25Z")

</div>

I have used Sawmill successfully:

[https://www.wowza.com/docs/how-to-use-sawmill-to-analyze-wowza-media-server-logs](https://www.wowza.com/docs/how-to-use-sawmill-to-analyze-wowza-media-server-logs)

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [March 2, 2012, 3:22pm UTC](https://community.wowza.com/t/how-to-setup-wowza-media-server-for-casterstats/36565/9 "2012-03-02T15:22:11Z")

</div>

I don’t think Sawmill does real-time stats, and not sure about reports by email, etc. It was easy to get it to work and has streaming stats.

Take a look at the built-in HTTPProviders and JConsole graphs for real-time data:

[https://www.wowza.com/docs/how-to-monitor-server-connections-load-and-application-statistics](https://www.wowza.com/docs/how-to-monitor-server-connections-load-and-application-statistics)

[https://www.wowza.com/docs/how-to-graph-individual-values-ex-concurrent-connections-to-the-server](https://www.wowza.com/docs/how-to-graph-individual-values-ex-concurrent-connections-to-the-server)

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [May 18, 2013, 11:55am UTC](https://community.wowza.com/t/how-to-setup-wowza-media-server-for-casterstats/36565/10 "2013-05-18T11:55:51Z")

</div>

Steve,

Hopefully CasterStats will follow-up here. I don’t know the answer. They may have direct support.

Richard

---

<div class="post-metadata">

### Author: ![Hazel\_Skeet](https://avatars.discourse-cdn.com/v4/letter/h/e8c25b/32.png) [@Hazel\_Skeet](https://community.wowza.com/u/Hazel_Skeet)
#### Post date: [May 19, 2011, 3:22pm UTC](https://community.wowza.com/t/how-to-setup-wowza-media-server-for-casterstats/36565/11 "2011-05-19T15:22:08Z")

</div>

Hallo Randall, If you want to see more than just the screenshots, you can try CasterStats on a 14 day free trial. Download from www.casterstats.com/downloads.php. Let us know if you need help with anything. Hazel

> The screenshots look great. I especially like the geolocation info.

---

<div class="post-metadata">

### Author: ![Stefano\_Cavallini](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/stefano_cavallini/32/896_2.png) [@Stefano\_Cavallini](https://community.wowza.com/u/Stefano_Cavallini)
#### Post date: [February 22, 2012, 11:51pm UTC](https://community.wowza.com/t/how-to-setup-wowza-media-server-for-casterstats/36565/12 "2012-02-22T23:51:28Z")

</div>

for users : pay attention when copy and paste the code, there are an error (space in many line)

stefano

---

<div class="post-metadata">

### Author: ![Stefano\_Cavallini](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/stefano_cavallini/32/896_2.png) [@Stefano\_Cavallini](https://community.wowza.com/u/Stefano_Cavallini)
#### Post date: [March 2, 2012, 12:03pm UTC](https://community.wowza.com/t/how-to-setup-wowza-media-server-for-casterstats/36565/13 "2012-03-02T12:03:44Z")

</div>

Hi,

i mean the code for casterstats logs,

so, now appear correct .

authorleon, sorry but i not understand fine what you mean, this code is for generate wowzamediaserver\_casterstats.log

what you want to do ?

stefano

---

<div class="post-metadata">

### Author: ![Stefano\_Cavallini](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/stefano_cavallini/32/896_2.png) [@Stefano\_Cavallini](https://community.wowza.com/u/Stefano_Cavallini)
#### Post date: [March 2, 2012, 7:11pm UTC](https://community.wowza.com/t/how-to-setup-wowza-media-server-for-casterstats/36565/14 "2012-03-02T19:11:41Z")

</div>

authorleon,

put in the Mount / Publishing Point / Filter :

/_defaultVHost_/applicationname/_definst_

i use casterstats and Sawmill also, and both working properly .

Does it have real time stats? NO

Does it have a web interface? YES

Produce report and send them via email (pdf) YES

stefano

---

<div class="post-metadata">

### Author: ![Stefano\_Cavallini](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/stefano_cavallini/32/896_2.png) [@Stefano\_Cavallini](https://community.wowza.com/u/Stefano_Cavallini)
#### Post date: [March 2, 2012, 11:28pm UTC](https://community.wowza.com/t/how-to-setup-wowza-media-server-for-casterstats/36565/15 "2012-03-02T23:28:15Z")

</div>

Hi authorleon,

look my configuration :

![](http://www.streamshow.it/test.png)

this working properly .

so, using http are you able to see connection counts details ? ( HTTPServerInfoXML & HTTPConnectionInfo )

---

<div class="post-metadata">

### Author: ![Stefano\_Cavallini](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/stefano_cavallini/32/896_2.png) [@Stefano\_Cavallini](https://community.wowza.com/u/Stefano_Cavallini)
#### Post date: [May 18, 2013, 2:23am UTC](https://community.wowza.com/t/how-to-setup-wowza-media-server-for-casterstats/36565/16 "2013-05-18T02:23:50Z")

</div>

elhal82,

why not working properly using /_defaultVHost_/applicationname/_definst_/stream.sdp ?

what exactly happens ?

steve

---

<div class="post-metadata">

### Author: ![Christophe\_Lopez](https://avatars.discourse-cdn.com/v4/letter/c/3d9bf3/32.png) [@Christophe\_Lopez](https://community.wowza.com/u/Christophe_Lopez)
#### Post date: [September 18, 2011, 11:58am UTC](https://community.wowza.com/t/how-to-setup-wowza-media-server-for-casterstats/36565/17 "2011-09-18T11:58:45Z")

</div>

Hi, what do you mean by “We also highly recommend that you use a separate log file for each application you want to analyze.” Adn how to acheive this?

Is this related to this part of the log4j.properties file?

"

# Below are logging definitions for dynamic log file generation on a per application basis.

# To use these logging appender, uncomment each of the lines below. It will generate log files

# using the following directory/file structure:

# 

# [install-dir]/logs/[vhost]/[application]/wowzamediaserver\_access.log

# [install-dir]/logs/[vhost]/[application]/wowzamediaserver\_error.log

# [install-dir]/logs/[vhost]/[application]/wowzamediaserver\_stats.log

"

Thanks.

---

<div class="post-metadata">

### Author: ![Christophe\_Lopez](https://avatars.discourse-cdn.com/v4/letter/c/3d9bf3/32.png) [@Christophe\_Lopez](https://community.wowza.com/u/Christophe_Lopez)
#### Post date: [September 18, 2011, 4:33pm UTC](https://community.wowza.com/t/how-to-setup-wowza-media-server-for-casterstats/36565/18 "2011-09-18T16:33:28Z")

</div>

Ok, supposing that my WowzaMediaServer is installed with the default setup:

[install-dir] will be: usr/local/WowzaMediaServer

[application] will be the name of my application for example: live

But what is the value of [vhost] for a default installation of Wowza?

---

<div class="post-metadata">

### Author: ![Arthor\_Leon](https://avatars.discourse-cdn.com/v4/letter/a/96bed5/32.png) [@Arthor\_Leon](https://community.wowza.com/u/Arthor_Leon)
#### Post date: [March 1, 2012, 6:45pm UTC](https://community.wowza.com/t/how-to-setup-wowza-media-server-for-casterstats/36565/19 "2012-03-01T18:45:38Z")

</div>

> for users : pay attention when copy and paste the code, there are an error (space in many line)
> 
> stefano

Hi…

Where it says Mount/Publishing Pint / FIlter

I have put: [http://xxx.xxx.xxx.xxx/logs/wowzamediaserver\_access.log](http://xxx.xxx.xxx.xxx/logs/wowzamediaserver_access.log)

But it does not work. I am connected and it shows the status as up.

I am using windows.

Can someone please help me.

---

<div class="post-metadata">

### Author: ![Arthor\_Leon](https://avatars.discourse-cdn.com/v4/letter/a/96bed5/32.png) [@Arthor\_Leon](https://community.wowza.com/u/Arthor_Leon)
#### Post date: [March 2, 2012, 5:07am UTC](https://community.wowza.com/t/how-to-setup-wowza-media-server-for-casterstats/36565/20 "2012-03-02T05:07:00Z")

</div>

> Hi,
> 
> i mean the code for casterstats logs,
> 
> so, now appear correct .
> 
> authorleon, sorry but i not understand fine what you mean, this code is for generate wowzamediaserver\_casterstats.log
> 
> what you want to do ?
> 
> stefano

Ok. I am a little confused here.

I have installed casterstats dashboard and setting it up.

On the stream editor, what must I put in, where it says (Mount, Publishing, Filter:)

I can connect to the server however I do not get any stats.

Thanks

[Next page](https://community.wowza.com/t/how-to-setup-wowza-media-server-for-casterstats/36565.md?page=2)
