1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
[RADIO LOGS] Help & Explanations
Actions to perform
Login to the management interface
Under your radio, click Settings and enable the transfer of logs
Enter information about the desired destination
The system tests whether or not the server configuration entered and the write permissions are OK
Find out more
The logs for your radio will be provided in the form of a zipped file xyz.mp3-20140805.log.gz (the date of the log is in the YYYYMMDD format).
Each log begins at 4:00 a.m. Swiss time and ends at 3:59:59 a.m. the following day.
The log is in the form ip user-identifier authuser [date-time] "request" status bytes "referer" "useragent" listening-time:
The best thing is to use a regular expression like the one below:
220.127.116.11 - - [09/Apr/2009:08:23:18 +0200] "GET /toto.mp3 HTTP/1.1" 200 1211297 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:18.104.22.168) Gecko/2009032711 Ubuntu/8.10 (intrepid) Firefox/3.0.8" 69
The syntax is is that of the function PHP preg_match and should be adapted if other functions/languages are used.
Preg_match gives a table with the following significant positions:
4 date - time complet
11: mount name
15: result (HTTP code)
16: length in bytes
18: user agent
19: playing time (seconds)
It may happen that the log line is malformed, because a referer is too long, for example. This Icecast behavior can not be corrected. In this case, the regexp does not extract anything and the information cannot be used because it is incomplete. So you must ignore the line.
The IP addresses of the row 22.214.171.124/25 should be ignored because these are the streaming servers.
Link to this FAQ: