Posts tagged stats
Awstats mod for process Wowza Stats
28Download the package from this link:
AWStats Mod for WowzaMediaServer (2616)
Awstats mod conf file (1709)
Add this lines into your Apache configuration:
# # Directives to allow use of AWStats as a CGI # Alias /awstatsclasses /usr/local/awstats-wmc/wwwroot/classes/ Alias /awstatscss /usr/local/awstats-wmc/wwwroot/css/ Alias /awstatsicons /usr/local/awstats-wmc/wwwroot/icon/ ScriptAlias /awstats/ /usr/local/awstats-wmc/wwwroot/cgi-bin/ # # This is to permit URL access to scripts/files in AWStats directory. # AddHandler cgi-script cgi pl Options ExecCGI AllowOverride None Order allow,deny Allow from all
Setting up the Crontab for update the Stats automatically
*/5 * * * * /usr/local/awstats-wmc/tools/awstats_updateall.pl now > /var/log/awstats.log
Setting up the Wowza Log Appender for save the information in the format then Awstats will be understand
For doit this edit the log4j.properties normally into this path:
/usr/local/WowzaMediaServer/conf/log4j.properties
Add this appender:
# Statistics appender (to use this appender add "serverAWStats" to the list of appenders in the first line of this file)
log4j.appender.serverAWStats=org.apache.log4j.DailyRollingFileAppender
log4j.appender.serverAWStats.DatePattern='.'yyyy-MM-dd
log4j.appender.serverAWStats.File=${com.wowza.wms.ConfigHome}/logs/wmconsulting_stats.log
log4j.appender.serverAWStats.layout=com.wowza.wms.logging.ECLFPatternLayout
log4j.appender.serverAWStats.layout.Fields=date,time,c-proto,c-ip,c-referrer,x-status,cs-uri-stem,sc-bytes,x-duration,x-sname,sc-stream-bytes,cs-stream-bytes,x-ctx,c-proto,x-appinst
log4j.appender.serverAWStats.layout.OutputHeader=true
log4j.appender.serverAWStats.layout.QuoteFields=false
log4j.appender.serverAWStats.layout.Delimeter=tab
log4j.appender.serverAWStats.layout.EventInclude=destroy
This way the logs will rotate automatically every day, and you can move this logs to the stats server… of curse you will have 1 day of delay with the stats… if the Awstats is on the same server than Wowza, you can update the logs every five minutes or less depend of your needs…
Test your configuration running the command manually
First run:
/usr/local/awstats-wmc/wwwroot/cgi-bin/awstats.pl -config=your.site.com
Update run:
/usr/local/awstats-wmc/wwwroot/cgi-bin/awstats.pl -update -config=site.com -showdropped
Real Time demo:

