Icecast Server/Events: Difference between revisions
(→log: Feature: Description of the log backend) |
(→url: Feature: Added infos on the url backend) |
||
Line 67: | Line 67: | ||
=== <code>url</code> === | === <code>url</code> === | ||
This backend is used to deliver the event to some backend server (normally via HTTP). It is very similar to the auth subsystem's <code>url</code> backend. | |||
==== Options ==== | |||
{| class="wikitable" | |||
! Option !! Required || Type || Default || Description | |||
|- | |||
| <code>username</code> || no || username || ''none'' || Username used to login to the backend. | |||
|- | |||
| <code>password</code> || no || password || ''none'' || Password used to login to the backend. | |||
|- | |||
| <code>url</code> || Yes || URL || ''none'' || URL used to deliver the events to | |||
|- | |||
| <code>action</code> || no || string || ''name of the event'' || Value for the <code>action</code>-parameter sent as part of backend requests. When no value is given the name of the event is used. | |||
|- | |||
| <code>legacy</code> || no || boolean || ''true'' || Whether or not the new style is used for the parameters. | |||
|- | |||
|} |
Revision as of 02:01, 18 April 2023
Events
Overview
Icecast 2.5.x features an event subsystem. This subsystem is used to deliver information on certain events that happen within the server to backends. In it's nature it is very similar to the auth subsystem. However in contrast to the auth subsystem it cannot modify the server state in any way. This makes it much more performant at the cost of slightly less usecases. Events in the event subsystem are inherently delivered asynchronously. Therefore they may arrive at some handler in any order. However information regarding their causality is preserved via their data.
Configuration
Event subsystem backends are configured via <event />
s inside of a <event-bindings />
. <event-bindings />
can be used inside:
<icecast />
(global headers)<mount />
<event-bindings />
has no properties itself.
<event />
may contain <option />
s with backend specific options. It will also use the following properties:
Property | Required | Type | Default | Description |
---|---|---|---|---|
type |
yes | Backend name | none | The name of the backend to use. |
trigger |
yes | list of event names | none | A comma separated list of event names to deliver to this backend. The list may include * as wildcard after the first dash. Also entries can be prefixed using ! to negatively match them.
|
List of events
event | Context | Description |
---|---|---|
icecast-start |
Global | Emitted when Icecast has been started up initially. |
icecast-stop |
Global | Emitted as part of Icecast's shutdown. |
icecast-active |
Global | Emitted when Icecast is active (has sources connected). |
icecast-idle |
Global | Emitted when Icecast is in idle (no sources connected). |
source-connect |
Source | Emitted when a source enters running state. |
source-disconnect |
Source | Emitted when a source is shut down. |
source-flags-changed |
Source | Emitted when a source experiences changes of it's flags. This might be for internal and external reasons. |
format-metadata-changed |
Source | Emitted whenever the metadata on the format level changes. |
dumpfile-opened |
Source | Emitted when a dumpfile was just opened. At the time this is emitted any operations on the dumpfile as per the operating systems specification on open files are allowed. This usually includes renaming the file and moving it between directories on the same volume. |
dumpfile-closed |
Source | Emitted when a dumpfile is closed. **Note:** At this point Icecast knows hardly anything about the dumpfile anymore. So not all information is available to handlers of this event. Any operation should be done via dumpfile-opened whenever possible.
|
dumpfile-error |
Source | Emitted when a dumpfile cannot be opened for any reason. See also dumpfile-opened .
|
Backends
exec
TODO.
log
The log
backend writes events into the standard error.log
. The main use for this is to debug and check configuration.
Options
Option | Required | Type | Default | Description |
---|---|---|---|---|
prefix |
no | string | Event |
A prefix to be used in the logfile. Can be used to easily grep(1) for the lines. |
level |
no | log level | information |
The level at which to log the events. |
url
This backend is used to deliver the event to some backend server (normally via HTTP). It is very similar to the auth subsystem's url
backend.
Options
Option | Required | Type | Default | Description |
---|---|---|---|---|
username |
no | username | none | Username used to login to the backend. |
password |
no | password | none | Password used to login to the backend. |
url |
Yes | URL | none | URL used to deliver the events to |
action |
no | string | name of the event | Value for the action -parameter sent as part of backend requests. When no value is given the name of the event is used.
|
legacy |
no | boolean | true | Whether or not the new style is used for the parameters. |