This section explains how to configure icecast2 for use with Awstats. This helps administrators better track and tally the number of hist or listeners to their Internet audio stream.
Thanks go out to Rado Ramarotafika <rado@linuxmg.org> for providing these instructions for inclusion on this web page. I have modified the layout slightly to work in this format.
According to the official Awstats homepage:
"AWStats is a short for Advanced Web Statistics. It's a free powerful and featureful tool that generates advanced web (but also ftp or mail) server statistics, graphically. This log analyzer works as a CGI or from command line and shows you all possible information your log contains, in few graphical web pages. It uses a partial information file to be able to process large log files, often and quickly. It can analyze log files from IIS (W3C log format), Apache log files (NCSA combined/XLF/ELF log format or common/CLF log format), WebStar and most of all web, proxy, wap, streaming servers (and ftp servers or mail logs)."
The instructions provided here were tested on the following machines:
Debian Woody - with awstats taken from http://www.backports.org
Mandrake 9.2
Gentoo Base System version 1.4.3.13
A working example is located at Radio Gasy Linux: http://linuxmg.org/cgi-bin/awstats.pl?config=radio.linuxmg.org
Listing 1: A comparison between icecast log access and apache log access file.
Icecast2 log access: 81.65.29.204 - - [23/Apr/2004:14:48:30 +0200] "GET /linuxmg.ogg HTTP/1.0" 200 6986276 "-" "xmms/1.2.9" 2786 |
Apache log access files. In my /usr/local/apache/conf/httpd.conf file, I have the following:
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
CustomLog /path/to/apache/log/access.log combined |
The actual log access entry appears as the following:
81.65.29.204 - - [26/Apr/2004:18:30:00 +0200] "GET /article.php3?id_article=86 HTTP/1.1" 200 6165 "-" "Mozilla/5.0 (compatible; Konqueror/3.2; Linux) (KHTML, like Gecko)" |
The following applications are required for running awstats with icecast logs.
Apache with mod_perl
Perl
Icecast2
Awstats
Here is a listing of all the programs and items needed to actually install awstats and have it record and display your icecast logs.
Apache http://httpd.apache.org/
Perl, use the package included with your distribution.
Icecast2, this HowTo.
Awstats, if your distribution does not already has a package try, http://awstats.sf.net/