From b97d5a31d77ac36d4c9d54b0e17670068025d519 Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Fri, 17 Sep 2021 17:01:41 +0200 Subject: [PATCH] Doc: Enhance notification `end` time docs --- doc/03-monitoring-basics.md | 10 ++++++++-- doc/09-object-types.md | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/03-monitoring-basics.md b/doc/03-monitoring-basics.md index bcfe55343..98e97672c 100644 --- a/doc/03-monitoring-basics.md +++ b/doc/03-monitoring-basics.md @@ -1817,8 +1817,14 @@ Sometimes the problem in question should not be announced when the notification (the object reaching the `HARD` state), but after a certain period. In Icinga 2 you can use the `times` dictionary and set `begin = 15m` as key and value if you want to postpone the notification window for 15 minutes. Leave out the `end` key -- if not set, -Icinga 2 will not check against any end time for this notification. Make sure to -specify a relatively low notification `interval` to get notified soon enough again. +Icinga 2 will not check against any end time for this notification. + +> **Note** +> +> Setting the `end` key to `0` will stop sending notifications immediately +> when a problem occurs, effectively disabling the notification. + +Make sure to specify a relatively low notification `interval` to get notified soon enough again. ``` apply Notification "mail" to Service { diff --git a/doc/09-object-types.md b/doc/09-object-types.md index ca69cdb74..0f581ab36 100644 --- a/doc/09-object-types.md +++ b/doc/09-object-types.md @@ -476,7 +476,7 @@ Configuration Attributes: vars | Dictionary | **Optional.** A dictionary containing custom variables that are specific to this notification object. users | Array of object names | **Required.** A list of user names who should be notified. **Optional.** if the `user_groups` attribute is set. user\_groups | Array of object names | **Required.** A list of user group names who should be notified. **Optional.** if the `users` attribute is set. - times | Dictionary | **Optional.** A dictionary containing `begin` and `end` attributes for the notification. + times | Dictionary | **Optional.** A dictionary containing `begin` and `end` attributes for the notification. If `end` is set to 0, `Notifications` are disabled permanently. Please read the [notification delay](03-monitoring-basics.md#notification-delay) chapter for details. command | Object name | **Required.** The name of the notification command which should be executed when the notification is triggered. interval | Duration | **Optional.** The notification interval (in seconds). This interval is used for active notifications. Defaults to 30 minutes. If set to 0, [re-notifications](03-monitoring-basics.md#disable-renotification) are disabled. period | Object name | **Optional.** The name of a time period which determines when this notification should be triggered. Not set by default (effectively 24x7).