Knowledge base

1000 FAQs, 500 tutorials and instructional videos. Here, there are only solutions!

Show Streaming Radio logs

Update 09/01/2026

This guide concerns the listening data for Infomaniak Streaming Radio, which can be exported using the FTP protocol. These logs (which are also used to generate listening statistics after “cleaning” or “processing”) are then automatically transferred via FTP for subsequent processing.

 

Introduction

  • Your radio logs will be provided in the form of a compressed file xyz.mp3-20140805.log.gz (the log date is in YYYYMMDD format).
  • Each log starts at 04:00 Swiss time and ends at 03:59:59 the following day.
  • The log is in the following format: ip user-identifier authuser [date-time] "request" status bytes "referer" "useragent" listening-time:
    • 81.56.215.98 - - [09/Apr/2019:08:23:18 +0200] "GET /toto.mp3 HTTP/1.1" 200 1211297 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.8) Gecko/2019032711 Ubuntu/8.10 (intrepid) Firefox/3.0.8" 69
    • It may happen that the log line is malformed, for example, due to a referer that is too long; this behavior of Icecast cannot be changed.
  • The addresses in the 84.16.67.128/25 range should be ignored because these are the streaming servers.
  • From the settings page in the Manager, you can request logs for past days.
  • You can also export them directly to ACPM or Mediapulse.

 

Enable sending logs via FTP

To do this:

  1. Click here to access the management interface for your product in the Infomaniak Manager (need help?).
  2. Click directly on the name assigned to the product in question.
  3. Click on the name of the audio stream in question.
  4. Click on Settings in the left-hand menu.
  5. Enable log export via FTP using the toggle switch.
  6. Enter a hostname: the address of the FTP server.
  7. Enter a username: the name of the FTP account.
  8. Enter a password: the password for the FTP account.
  9. Enter the directory on the server where the logs will be stored.
  10. Click on the Save button at the bottom of the page:

To retrieve your logs, use only the standard FTP protocol in Passive mode. The service is not compatible with SFTP, FTPS, or SSH keys. The system provides 3 connection attempts in case of interruption.

 

Processing the logs

The best approach is to use a regular expression like the one below:

"/^(\S+)\s(.+)\s(\S+)?\s\[((\d\d)\/([a-zA-Z]{3,3})\/(\d\d\d\d)\:(\d\d)\:(\d\d)\:(\d\d)\s\+\d\d\d\d)\]\s"GET\s\/([\-a-z0-9]{1,40}(\.)?(mp3|aac|ogg){0,1})(.*)?"\s(\d{3,3})\s(\d+)\s"(.+)"\s"(.+)"\s(\d+)$/i";

This syntax is for the PHP function preg_match and should be adapted if other functions/languages are used.

The preg_match function returns an array with the following significant positions:

1ip
4date - full time
5day
6month
7year
8hour
9min
10seconds
11mount point
15result (HTTP code)
16length in bytes
18user agent
19listening duration (seconds)

Has this FAQ been helpful?