Wowza Logging Setup
To use the reporting capabilities of CasterStats Reporter, you need to parse streaming server log files.
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:
[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 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.
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 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 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):
[B]/_defaultVHost_/applicationname/_definst_/mystream.stream[/B]
-
(will take all data within that instance):
[B]/_defaultVHost_/applicationname/_definst_[/B]
-
(same effect as point a):
[B] rtmp://myserver/applicationname/mystream.stream[/B]
-
Be sure to set up the username of the HTTP Provider
-
And the correct password
If you want to retrieve logs located on a remote server by FTP, point to the log file you specified in the log4j.properties file in the first step of this article.
Of course you can specify any local or network path with wildcards in the Sources tab.
Check our knowledgebase article on Wowza Media Server SetUp for any updates