Skip to content

jb3/icecast-exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Icecast Exporter

Icecast Exporter exports statistics from Icecast into Prometheus.

We use this at University Radio Nottingham for pulling statistics from our web streaming into a Grafana instance which is used to find listener counts in time-series.

Install

Ensure you have a working Go installation (minimum 1.18) and run the following:

$ go install github.com/jb3/icecast-exporter@latest

Once installed, you will find the compiled binary at /home/user/go/bin/icecast-exporter.

Usage

Once you have a binary, you can use the program with the following command line flags:

FlagDefaultRequiredDescription
urlN/AThe URL of the Icecast status-json.xsl endpoint to poll from.
port2112The port to listen and serve metrics from.
endpoint/metricsEndpoint to serve metrics from.
interval15Timing interval to poll Icecast (seconds).

An example invocation is as follows:

$ ./icecast-exporter -url https://icecast.example.com/status-json.xsl -port 1234

Running in the background

An example FreeBSD rc.d service might look like:

#!/bin/sh

. /etc/rc.subr

name="icecast_exporter"
rcvar="icecast_exporter_enable"
pidfile="/var/run/icecast_exporter.pid"

command="/usr/sbin/daemon"
command_args="-P ${pidfile} -r -t icecast_exporter /home/joe/go/bin/icecast-exporter -url https://icecast.example.com/status-json.xsl"

load_rc_config $name
run_rc_command "$1"

Once this file has been edited and placed in `/usr/local/etc/rc.d/icecast-exporter` (and set to executable), run:

# Enable the Icecast Exporter service
$ sysrc icecast_exporter_enable=YES
# Start the Icecast Exporter service
$ service iceast_exporter start

License

This project is licensed under MIT.

About

A Prometheus Exporter for Icecast

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages