icecast

How can I get server statistics XML of Icecast?


I'm using Icecast 2.3.3 on Ubuntu 14.04.4 LTS.

I want to display currently played song title and its artist name on Apache run on the same server as Icecast.

How can I get server statistics XML of Icecast as described at the following page?

http://icecast.org/docs/icecast-2.3.3/server-stats.html


Solution

  • If you want the XML representation, you'll either have to access http://localhost:8000/admin/stats with admin credentials or place a custom XSLT sheet in /usr/share/icecast2/web.

    For current versions of Icecast this should not be necessary, but if you want to deeply customize things, this is retained for reference. You can find old and potentially outdated example XSLT files here:

    https://ruecker.fi/foss/icecast/xslt/

    A file that produces XML output is here:

    https://ruecker.fi/foss/icecast/xslt/rds-xml.xsl

    All you need to do is edit the mountpoint name in the file to match the name of the mountpoint you want information for.

    Or you could just install the official Xiph.org package of latest Icecast:

    https://wiki.xiph.org/Icecast_Server/Installing_latest_version_(official_Xiph_repositories)

    As it provides a JSON API. It can even be queried directly from within a web page without necessitating any server side code.