KH statistics mix present state, accumulated events and rates. Their names are not a promise that they share units or lifetimes. Read a field in its global or mount context before alerting on it.
Obtain a scoped snapshot
The administration XML is the documented inspection surface. This read-only example saves a private snapshot; the service and test account must already exist:
umask 077
curl --fail --silent --show-error --user admin 'https://stream.example.org/admin/stats?mount=%2Flive.ogg' --output kh-stats.xmlDo not publish the resulting file. A public stylesheet can expose a different subset from authenticated XML. Do not assume that a regular Icecast JSON endpoint or schema is present in this KH checkout.
Keep meaning and scope together
| Field | Interpretation in this source stand | Monitoring consequence |
|---|---|---|
Global listeners | Current listener population, periodically updated | A gauge; zero may be intentional |
Global clients | Current clients, broader than audio listeners | Do not bill or alert as listeners |
connections | Incremented when a connection is accepted | Accumulated activity, not audience |
listener_connections | Listener connection events; global and mount contexts exist | Reconnects can count again |
source_client_connections | Source-client connection events | Does not mean simultaneous sources |
source_relay_connections | Relay-source connection events | Interpret with relay retries |
outgoing_kbitrate | Rate calculation; implementation converts bytes using 1024 | Keep implementation units explicit |
stream_kbytes_sent | Accumulated stream data accounting | Reset-aware deltas, not a live rate |
server_start | Server start timestamp | Identify a new observation period |
The old manual is a historical guide, not a complete inventory for the later source. Missing, hidden or format-specific fields must remain “unavailable” in a consumer; replacing them with zero invents evidence.
Diagnose with several observations
Capture a baseline, connect one disposable listener, disconnect it and compare snapshots and logs. Then test a source reconnect and process restart. Record which series reset. Compute deltas only between comparable samples; do not subtract across a restart or an administrative reset. The field meanings above were checked against source update sites, while the described observation sequence still requires a running isolated instance.