Reference

Interpret statistics without confusing counters

Distinguish current listeners from cumulative connections, consume XML or JSON defensively and build monitoring around verified stream behaviour.

On this page

A rising connection counter is not a rising audience. Icecast exposes both current gauges and cumulative counts, with different lifetimes. Name the metric, its scope and its reset condition before drawing conclusions from a dashboard.

Keep scope and lifetime together

FieldInterpretation
Global listenersCurrently active listener connections
listener_connectionsListener connections accumulated since startup
clientsCurrent client connections of more than one kind
connectionsAccumulated incoming TCP connections
sourcesCurrent active sources
server_start_iso8601Server startup time
Mount listenersCurrent listeners for this stream
Mount listener_peakPeak concurrent listeners for the source’s lifetime
total_bytes_read / total_bytes_sentSource-scope byte totals
stream_start_iso8601Start of the current source connection
slow_listenersSlow-listener count exposed for the source

Source-scoped values can reset when a source disconnects or reconnects. A process restart resets server-lifetime counters. Handle a smaller counter after a restart as a reset, not negative traffic. Never compare bit/s, kbit/s and bytes without conversion.

Choose a data interface

sh · Code example
curl --fail --show-error --user admin http://127.0.0.1:8000/admin/stats
curl --fail --show-error http://127.0.0.1:8000/status-json.xsl

The first local request is authenticated XML; the second is the public JSON view where enabled. The public view exposes less than the administration data. Fields may be absent depending on media type and current state. A consumer should cope with no active sources, a single source object or a source collection as appropriate to the returned representation.

Do not scrape the human-facing status HTML as an API. Use documented XML/JSON or a deliberately maintained XSLT transform. Validate the response type and parse it safely; never insert source-provided titles into HTML unescaped.

Monitor the media path

Track server reachability, presence of the expected source, repeated source reconnects and listener delivery separately. A reachable JSON endpoint can coexist with a missing source. During a controlled test, compare statistics with one actual player connection, stop that connection and observe the corresponding gauge. A single listener figure cannot prove continuous audible playback.

Sources