icecast2_stats.html 11.1 KB
Newer Older
j's avatar
j committed
1 2 3 4
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
5
<title>Icecast v2.x Documentation</title>
j's avatar
j committed
6 7 8 9
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<div class="boxtest">
10
<h1>Icecast 2 Server Statistics</h1>
j's avatar
j committed
11
<hr id='titlebar' />
j's avatar
j committed
12 13
<br />
<br />
14 15 16 17 18 19 20 21
<ul>
<li><a href="#overview">Overview</a></li>
<li><a href="#xslt">HTML interface, XSLT generated</a></li>
<li><a href="#xslt_advanced">Advanced machine readable data, XSLT generated</a></li>
<li><a href="#available_raw_data">Available raw data</a></li>
</ul>

<a name="overview"></a>
22
<h2>Overview</h2>
23
<p>Icecast provides extensive run time statistics. Both in the form of active connection numbers and cumulative counters (since server startup or respectively source connection startup).</p>
24 25
<a name="xslt"></a>
<h2>HTML interface, XSLT generated</h2>
26 27
<p>Icecast comes with a basic, XHTML web interface. It exposes a basic set of server statistics that should fulfil basic user needs. If so desired the files in web-root can be customized to contain more or less information (see section on raw XML data below). <br/>
We strongly discourage attempts to scrape data from this interface as we do not consider this an API and will change it, even completely, between versions. The preferred ways are custom XSLT, JSON and raw XML.</p>
28 29
<a name="xslt_advanced"></a>
<h2>Advanced machine readable data, XSLT generated</h2>
30 31
<p>Icecast uses the very powerful libXSLT engine to transform its internal raw statistical data into custom tailored interfaces. Many people have written custom XSLT code that produces e.g. plain text "now playing", XSPF, VCLT, munin interface data, etc.</p>
<p>Since version 2.4.0 Icecast includes a basic JSON API (/status-json.xsl) based on a xml2json template by Doeke Zanstra (see xml2json.xslt). It exposes a basic set of server statistics that should fulfil basic user needs. The intention is to not break backwards compatibility of this interface in the future, still we recommend to design robust software that can deal with possible changes like addition or removal of variables.</p>
32 33
<a name="available_raw_data"></a>
<h2>Available raw data</h2>
34
<p>This section contains information about the raw XML server statistics data available inside icecast.  An example stats XML tree will be shown and each element will be described.  The following example stats tree will be used:</p>
35
<pre>
36
&lt;?xml version="1.0"?&gt;	
37
&lt;icestats&gt;
38
	&lt;admin&gt;icemaster@example.org&lt;/admin&gt;
39
	&lt;client_connections&gt;13&lt;/client_connections&gt;
40
	&lt;clients&gt;2&lt;/clients&gt;
41
	&lt;connections&gt;14&lt;/connections&gt;
42 43 44 45 46 47 48
	&lt;file_connections&gt;1&lt;/file_connections&gt;
	&lt;host&gt;stream.example.org&lt;/host&gt;
	&lt;listener_connections&gt;7&lt;/listener_connections&gt;
	&lt;listeners&gt;1&lt;/listeners&gt;
	&lt;location&gt;Earth&lt;/location&gt;
	&lt;server_id&gt;Icecast 2.4.0&lt;/server_id&gt;
	&lt;server_start&gt;Tue, 01 Apr 2014 23:42:05 +0000&lt;/server_start&gt;
49
	&lt;server_start_iso8601&gt;2014-04-01T23:42:05+0000&lt;/server_start&gt;
50 51 52
	&lt;source_client_connections&gt;1&lt;/source_client_connections&gt;
	&lt;source_relay_connections&gt;0&lt;/source_relay_connections&gt;
	&lt;source_total_connections&gt;1&lt;/source_total_connections&gt;
53
	&lt;sources&gt;1&lt;/sources&gt;
54 55
	&lt;stats&gt;0&lt;/stats&gt;
	&lt;stats_connections&gt;0&lt;/stats_connections&gt;
56
	&lt;source mount="/test.ogg"&gt;
57 58 59 60 61 62
		&lt;artist&gt;Test artist&lt;/artist&gt;
		&lt;audio_bitrate&gt;32000&lt;/audio_bitrate&gt;
		&lt;audio_channels&gt;2&lt;/audio_channels&gt;
		&lt;audio_info&gt;samplerate=32000;channels=2;quality=-1;ice-channels=1&lt;/audio_info&gt;
		&lt;ice-bitrate&gt;32&lt;/ice-bitrate&gt;
		&lt;listener_peak&gt;2&lt;/listener_peak&gt;
63
		&lt;listeners&gt;0&lt;/listeners&gt;
64 65
		&lt;listenurl&gt;http://stream.example.org:8000/test.ogg&lt;/listenurl&gt;
		&lt;max_listeners&gt;unlimited&lt;/max_listeners&gt;
66
		&lt;public&gt;0&lt;/public&gt;
67 68 69 70 71 72 73 74
		&lt;quality&gt;-1.00&lt;/quality&gt;
		&lt;samplerate&gt;32000&lt;/samplerate&gt;
		&lt;server_description&gt;A stream for testing ogg/vorbis.&lt;/server_description&gt;
		&lt;server_name&gt;TestStream&lt;/server_name&gt;
		&lt;server_type&gt;application/ogg&lt;/server_type&gt;
		&lt;slow_listeners&gt;1&lt;/slow_listeners&gt;
		&lt;source_ip&gt;203.0.113.42&lt;/source_ip&gt;
		&lt;stream_start&gt;Wed, 02 Apr 2014 13:37:42 +0000&lt;/stream_start&gt;
75
		&lt;stream_start_iso8601&gt;2014-04-02T13:37:42+0000&lt;/stream_start&gt;
76 77 78 79 80
		&lt;subtype&gt;Vorbis&lt;/subtype&gt;
		&lt;title&gt;Test title&lt;/title&gt;
		&lt;total_bytes_read&gt;448632&lt;/total_bytes_read&gt;
		&lt;total_bytes_sent&gt;207463&lt;/total_bytes_sent&gt;
		&lt;user_agent&gt;IceS 2.0.1&lt;/user_agent&gt;
81 82 83 84
	&lt;/source&gt;
&lt;/icestats&gt;
</pre>
<h3>General Statistics</h3>
85 86 87 88 89 90 91 92 93 94
<!--
<h4></h4>
<div class="indentedbox">

</div>
-->
<h4>admin</h4>
<div class="indentedbox">
As set in the server config, this should contain contact details for getting in touch with the server administrator. Usually this will be an email address, but as this can be an arbitrary string it could also be a phone number.
</div>
95
<h4>client_connections</h4>
j's avatar
j committed
96
<div class="indentedbox">
97
Client connections are basically anything that is not a source connection.  These include listeners (not concurrent, but cumulative), any admin function accesses, and any static content (file serving) accesses. This is an accumulating counter.
98
</div>
99
<h4>clients</h4>
j's avatar
j committed
100
<div class="indentedbox">
101
Number of currently active client connections. <!-- FIXME: be more verbose -->
102 103
</div>
<h4>connections</h4>
j's avatar
j committed
104
<div class="indentedbox">
105
The total of all inbound TCP connections since start-up. This is an accumulating counter.
106 107 108
</div>
<h4>file_connections</h4>
<div class="indentedbox">
109
<!--FIXME-->This is an accumulating counter.
110 111 112
</div>
<h4>host</h4>
<div class="indentedbox">
113
As set in the server config, this should be the full DNS resolveable name or FQDN for the host on which this icecast instance is running.
114 115 116
</div>
<h4>listener_connections</h4>
<div class="indentedbox">
117
Number of listener connections to mount points. This is an accumulating counter.
118 119 120
</div>
<h4>listeners</h4>
<div class="indentedbox">
121
Number of currently active listener connections.
122 123 124
</div>
<h4>location</h4>
<div class="indentedbox">
125
As set in the server config, this is a free form field that should describe e.g. the physical location of this server.
126 127 128 129 130
</div>
<h4>server_id</h4>
<div class="indentedbox">
Defaults to the version string of the currently running Icecast server. While not recommended it can be overriden in the server config.
</div>
131 132 133 134
<h4>server_start_iso8601</h4>
<div class="indentedbox">
Timestamp of server startup in ISO 8601 date format.
</div>
135 136
<h4>server_start</h4>
<div class="indentedbox">
137
Timestamp of server startup in RFC 2822 date format. This field is deprecated and may be removed in a future version, please use <em>server_start_iso8601</em> instead.
138 139 140
</div>
<h4>source_client_connections</h4>
<div class="indentedbox">
141
Source client connections are the number of times (cumulative since start-up, not just currently connected) a source client has connected to icecast. This is an accumulating counter.
142 143 144
</div>
<h4>source_relay_connections</h4>
<div class="indentedbox">
145
Number of outbound relay connections to (master) icecast servers. This is an accumulating counter.
146 147 148
</div>
<h4>source_total_connections</h4>
<div class="indentedbox">
149
Both clients and relays. This is an accumulating counter.
150
<!--FIXME-->
151 152
</div>
<h4>sources</h4>
j's avatar
j committed
153
<div class="indentedbox">
154
The total of currently connected sources.
155
</div>
156 157 158 159 160 161
<h4>stats</h4>
<div class="indentedbox">
The total of currently connected STATS clients.
</div>
<h4>stats_connections</h4>
<div class="indentedbox">
162
Number of times a stats client has connected to icecast. This is an accumulating counter.
163 164 165
</div>


166
<h3>Source-specific Statistics</h3>
167 168
<p>Please note that the statistics are valid within the scope of the current source connection. A reconnect or disconnection will reset those.
</p>
169
<h4>artist</h4>
j's avatar
j committed
170
<div class="indentedbox">
vanguardist's avatar
Weee~  
vanguardist committed
171
Artist of the current song (metadata set by source client).
172 173
</div>
<h4>title</h4>
j's avatar
j committed
174
<div class="indentedbox">
vanguardist's avatar
Weee~  
vanguardist committed
175
Title of the current song (metadata set by source client).
176
</div>
177 178 179 180 181 182 183 184
<h4>audio_bitrate</h4>
<div class="indentedbox">
<!--FIXME-->(metadata set by source client).
</div>
<h4>audio_channels</h4>
<div class="indentedbox">
<!--FIXME-->(metadata set by source client).
</div>
185
<h4>audio-info</h4>
j's avatar
j committed
186
<div class="indentedbox">
187
Information about the bitrate/samplerate/quality of the stream (metadata set by source client). Also used for YP entries.
188 189
</div>
<h4>ice-bitrate</h4>
190 191 192 193 194
<h4>samplerate</h4>
<div class="indentedbox">
Information about the bitrate/samplerate/quality of the stream (metadata set by source client).
</div>
<h4>listener_peak</h4>
j's avatar
j committed
195
<div class="indentedbox">
196
Peak concurrent number of listener connections for this mountpoint.
197 198
</div>
<h4>listeners</h4>
j's avatar
j committed
199
<div class="indentedbox">
200 201
The number of currently connected listeners.
</div>
202 203
<h4>listenurl</h4>
<div class="indentedbox">
204
URL to this mountpoint. (This is not aware of aliases)
205 206 207
</div>
<h4>max_listeners</h4>
<div class="indentedbox">
208
Maximum number of listeners permitted to concurrently connect to this mountpoint.
209
</div>
210
<h4>public</h4>
j's avatar
j committed
211
<div class="indentedbox">
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231
Flag that indicates whether this mount is to be listed on a YP (set by source client, can be overriden by server config).
</div>
<h4>quality</h4>
<div class="indentedbox">
<!--FIXME-->(metadata set by source client).
</div>
<h4>samplerate</h4>
<div class="indentedbox">
<!--FIXME-->(metadata set by source client).
</div>
<h4>server_description</h4>
<div class="indentedbox">
<!--FIXME-->(metadata set by source client).
</div>
<h4>server_name</h4>
<div class="indentedbox">
<!--FIXME-->(metadata set by source client).
</div>
<h4>server_type</h4>
<div class="indentedbox">
232
MIME-type for the stream currently active on this mountpoint.
233 234 235 236 237 238 239
</div>
<h4>slow_listeners</h4>
<div class="indentedbox">
<!--FIXME-->
</div>
<h4>source_ip</h4>
<div class="indentedbox">
240 241 242 243 244
IP address of the currently connected source client. In case of relays the content of &lt;server&gt;.
</div>
<h4>stream_start_iso8601</h4>
<div class="indentedbox">
Timestamp of when the currently active source client connected to this mount point in ISO 8601 date format.
245 246 247
</div>
<h4>stream_start</h4>
<div class="indentedbox">
248
Timestamp of when the currently active source client connected to this mount point in RFC 2822 date format. This field is deprecated and may be removed in a future version, please use <em>stream_start_iso8601</em> instead.
249 250 251
</div>
<h4>subtype</h4>
<div class="indentedbox">
252
MIME-subtype, can be e.g. codecs like Opus, Vorbis, Theora.
253 254 255
</div>
<h4>total_bytes_read</h4>
<div class="indentedbox">
256
Total number of bytes received from the source client.
257 258 259
</div>
<h4>total_bytes_sent</h4>
<div class="indentedbox">
260
Total number of bytes sent to all listener connections since last source connect.
261
</div>
262
<h4>user_agent</h4>
j's avatar
j committed
263
<div class="indentedbox">
264
HTTP user agent string as sent by the source client.
265
</div>
j's avatar
j committed
266 267
<br />
<br />
268
Additional data can be accessed through the admin interface, as every page of the admin interface has an XML equivalent.
j's avatar
j committed
269
<br />
270
</div>
271 272
</body>
</html>