On 17 Mar 2015, at 14:07, Robert Stanford wrote:
> Hello, I?d like to use the new event triggers in 2.5, but the docs
> haven?t been updated yet.
>
> I?ve managed to gather from the source that the config xml needs to
> contain an ?event? node with a ?trigger? attribute, but I
> don?t know what the trigger options are.
>
> Anyone used this or have any idea?
Hey, great that you want to use the new events feature!
Note that the feature is currently in beta and that you will need to
adjust your config if we
decide on tag names for the final release (probably only
'kartoffelsalat' will be changed to something else)
The recently added event (in the config represented by the <event> tag)
can be used in a group of events tag,
which is currently called <kartoffelsalat>. The kartoffelsalat tag can
be used either in the <icecast> or <mount> sections.
An event has something called 'backend', which indicates how the event
is handled.
Possible backend are currently:
- log: logs the event to error log
- exec: executes a program or script
- url: calls a given URL (via HTTP)
An event can have two arguments: type and trigger
type defines the backend, so it can be log, exec or url.
Additional options differ, and are specific to the event backend. They
are defined
using <option name="foo" value="bar" /> tags, which
are children of the
event tag.
Possible options for current backends:
exec
- executable: Specifies the path to the executable that should be
executed when event is triggered
log
- prefix: Log line prefix (optional, defaults to no prefix)
- level: loglevel (defaults to INFO)
url
- url: The url to which to make the request
- username: The username to use, in case auth is needed
- password: The password to use, in case auth is needed
- action: value for the `action` parameter that is passed to the URL
(?action=?)
There are a number of special options passed, in case of url backend
this is done
in the URL query:
action (see above)
mount (the mount that triggered the action)
port (icecast port)
client (icecast server name)
role
username
ip
agent
duration
admin
for exec they are passed as environment variables:
ICECAST_VERSION
ICECAST_HOSTNAME
ICECAST_ADMIN
ICECAST_LOGDIR
EVENT_URI
EVENT_TRIGGER
SOURCE_ACTION
CLIENT_IP
CLIENT_ROLE
CLIENT_USERNAME
CLIENT_USERAGENT
MOUNT_NAME
MOUNT_DESCRIPTION
MOUNT_URL
MOUNT_GENRE
SOURCE_MOUNTPOINT
SOURCE_PUBLIC
SOURCE_HIDDEN
>
> Cheers,
> Rob Stanford
> _______________________________________________
> Icecast mailing list
> Icecast at xiph.org
> http://lists.xiph.org/mailman/listinfo/icecast