@@ -901,11 +901,17 @@ NotificationCommand object refer to that.
901901
902902### <a id =" event-commands " ></a > Event Commands
903903
904- Unlike notifications event commands are called on every service execution
905- if defined. Therefore the ` EventCommand ` object should define a command line
904+ Unlike notifications event commands are called on every host/service execution
905+ if one of these conditions match:
906+
907+ * The host/service is in a [ soft state] ( #hard-soft-states )
908+ * The host/service state changes into a [ hard state] ( #hard-soft-states )
909+ * The host/service state recovers from a [ soft or hard state] ( #hard-soft-states ) to [ OK] ( #service-states ) /[ Up] ( #host-states )
910+
911+ Therefore the ` EventCommand ` object should define a command line
906912evaluating the current service state and other service runtime attributes
907- available through runtime vars. Runtime macros such as ` $SERVICESTATETYPE $ `
908- and ` $SERVICESTATE $ ` will be processed by Icinga 2 helping on fine-granular
913+ available through runtime vars. Runtime macros such as ` $service.state_type $ `
914+ and ` $service.state $ ` will be processed by Icinga 2 helping on fine-granular
909915events being triggered.
910916
911917Common use case scenarios are a failing HTTP check requiring an immediate
@@ -1604,22 +1610,6 @@ Detailed information on the commands and their required parameters can be found
16041610on the [ Icinga 1.x documentation] ( http://docs.icinga.org/latest/en/extcommands2.html ) .
16051611
16061612
1607- ## <a id =" event-handlers " ></a > Event Handlers
1608-
1609- Event handlers are defined as ` EventCommand ` objects in Icinga 2.
1610-
1611- Unlike notifications event commands are called on every host/service execution
1612- if defined. Therefore the ` EventCommand ` object should define a command line
1613- evaluating the current service state and other service runtime attributes
1614- available through runtime macros. Runtime macros such as ` $service.state_type$ `
1615- and ` $service.state$ ` will be processed by Icinga 2 helping on fine-granular
1616- events being triggered.
1617-
1618- Common use case scenarios are a failing HTTP check requiring an immediate
1619- restart via event command, or if an application is locked and requires
1620- a restart upon detection.
1621-
1622-
16231613## <a id =" logging " ></a > Logging
16241614
16251615Icinga 2 supports three different types of logging:
0 commit comments