-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
--- | ||
title: Repeat Interval | ||
--- | ||
|
||
The repeat interval determines the duration between subsequent notifications after an initial successful delivery. | ||
|
||
```yaml title="deployment-failed.yaml" | ||
apiVersion: mission-control.flanksource.com/v1 | ||
kind: Notification | ||
metadata: | ||
name: config-updates | ||
namespace: default | ||
spec: | ||
events: | ||
- config.healthy | ||
- config.unhealthy | ||
- config.warning | ||
- config.unknown | ||
filter: config.type == "Kubernetes::Deployment" | ||
to: | ||
email: [email protected] | ||
repeatInterval: 2h | ||
``` | ||
The above notification sends at max 1 email notification in a moving 2 hour window. | ||
## Repeat Group | ||
By default, the repeat interval applies to any notification sent for the given notification. | ||
In the example above, if a notification is sent for a `config.healthy` event and then a new notification is to be sent | ||
for a `config.unhealthy` event, then the notification is dropped due to the repeat interval. | ||
|
||
With grouping, you can apply the repeat interval per source event & per resource ID. | ||
|
||
- `source_event` | ||
- `resource_id` | ||
|
||
```yaml title="deployment-updates.yaml" | ||
apiVersion: mission-control.flanksource.com/v1 | ||
kind: Notification | ||
metadata: | ||
name: config-updates | ||
namespace: default | ||
spec: | ||
events: | ||
- config.healthy | ||
- config.unhealthy | ||
- config.warning | ||
- config.unknown | ||
filter: config.type == "Kubernetes::Deployment" | ||
to: | ||
email: [email protected] | ||
repeatInterval: 2h | ||
// highlight-start | ||
repeatGroup: | ||
- source_event | ||
// highlight-end | ||
``` | ||
|
||
With this change, you'll now receive at max 4 notifications for each source event. | ||
Check warning on line 61 in mission-control/docs/notifications/concepts/repeat-interval.mdx GitHub Actions / vale[vale] mission-control/docs/notifications/concepts/repeat-interval.mdx#L61
Raw output
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,16 @@ | |
description: "Properties are channel dependent special directives to modify the notification message. Example: for email, `[email protected]` modifies the sender of the email. [Read more](https://containrrr.dev/shoutrrr/v0.8/)", | ||
Check warning on line 35 in mission-control/docs/reference/notifications/_notification.mdx GitHub Actions / vale[vale] mission-control/docs/reference/notifications/_notification.mdx#L35
Raw output
|
||
scheme: "`map[string]string`" | ||
}, | ||
{ | ||
field: "repeatInterval", | ||
Check failure on line 39 in mission-control/docs/reference/notifications/_notification.mdx GitHub Actions / vale[vale] mission-control/docs/reference/notifications/_notification.mdx#L39
Raw output
|
||
description: "The waiting time to resend a notification after it has been succefully sent.", | ||
Check failure on line 40 in mission-control/docs/reference/notifications/_notification.mdx GitHub Actions / vale[vale] mission-control/docs/reference/notifications/_notification.mdx#L40
Raw output
|
||
scheme: "duration" | ||
}, | ||
{ | ||
field: "repeatGroup", | ||
Check failure on line 44 in mission-control/docs/reference/notifications/_notification.mdx GitHub Actions / vale[vale] mission-control/docs/reference/notifications/_notification.mdx#L44
Raw output
|
||
description: "RepeatGroup allows notifications to be grouped by certain set of keys and only send one per group within the specified repeat interval. Valid group keys: `resource_id` & `source_event`.", | ||
scheme: "`[]string`" | ||
}, | ||
{ | ||
field: "title", | ||
description: "Channel dependent e.g. subject for email", | ||
|
@@ -57,7 +67,7 @@ | |
}, | ||
{ | ||
field: "filter", | ||
description: "Filter narrows down the event trigger. Example: `check.type == 'http'` filter on `check.failed` event will only send notification for failing http checks.", | ||
description: "Filter narrows down the event trigger.\n\nExample: `check.type == 'http'` filter on `check.failed` event will only send notification for failing http checks.", | ||
Check warning on line 70 in mission-control/docs/reference/notifications/_notification.mdx GitHub Actions / vale[vale] mission-control/docs/reference/notifications/_notification.mdx#L70
Raw output
|
||
scheme: "CEL", | ||
templateEnv: [ | ||
Check failure on line 72 in mission-control/docs/reference/notifications/_notification.mdx GitHub Actions / vale[vale] mission-control/docs/reference/notifications/_notification.mdx#L72
Raw output
|
||
{"name": "CheckEvents", "url": "/reference/notifications/template_vars#check-health-env"}, | ||
|