]> granicus.if.org Git - icinga2/blob - doc/3.09-event-handlers.md
Fix unit tests.
[icinga2] / doc / 3.09-event-handlers.md
1 ## <a id="event-handlers"></a> Event Handlers
2
3 Event handlers are defined as `EventCommand` objects in Icinga 2.
4
5 Unlike notifications event commands are called on every host/service state change
6 if defined. Therefore the `EventCommand` object should define a command line
7 evaluating the current service state and other service runtime attributes
8 available through runtime macros. Runtime macros such as `$SERVICESTATETYPE$`
9 and `$SERVICESTATE$` will be processed by Icinga 2 helping on fine-granular
10 events being triggered.
11
12 Common use case scenarios are a failing HTTP check requiring an immediate
13 restart via event command, or if an application is locked and requires
14 a restart upon detection.