mirror of https://github.com/Icinga/icinga2.git
15 lines
697 B
Markdown
15 lines
697 B
Markdown
## <a id="event-handlers"></a> Event Handlers
|
|
|
|
Event handlers are defined as `EventCommand` objects in Icinga 2.
|
|
|
|
Unlike notifications event commands are called on every host/service state change
|
|
if defined. Therefore the `EventCommand` object should define a command line
|
|
evaluating the current service state and other service runtime attributes
|
|
available through runtime macros. Runtime macros such as `$SERVICESTATETYPE$`
|
|
and `$SERVICESTATE$` will be processed by Icinga 2 helping on fine-granular
|
|
events being triggered.
|
|
|
|
Common use case scenarios are a failing HTTP check requiring an immediate
|
|
restart via event command, or if an application is locked and requires
|
|
a restart upon detection.
|