Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: notification wait for & silences #297

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions mission-control/docs/notifications/concepts/silences.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
title: Silences
---

Silences prevent notifications from being sent.
Silences are attached to a particular resource (`catalog`, `health check`, or `component`) and are active for a specified duration.

:::note
Notifications that aren't sent due to silence are still visible in the notification history for auditing purposes.
:::

## Use cases

- Planned maintenance or deployments. Eg: You can silence a namespace or a helm release and automatically silence notifications from all of their children.

Check warning on line 14 in mission-control/docs/notifications/concepts/silences.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] mission-control/docs/notifications/concepts/silences.mdx#L14

[Flanksource.Wordiness] Consider using 'all' instead of 'all of'.
Raw output
{"message": "[Flanksource.Wordiness] Consider using 'all' instead of 'all of'.", "location": {"path": "mission-control/docs/notifications/concepts/silences.mdx", "range": {"start": {"line": 14, "column": 134}}}, "severity": "WARNING"}
- Non-critical resources: Notifications from resources that routinely trigger alerts but are expected and harmless can be silenced.
- Known issues: If there's a known issue that can't be immediately resolved (e.g., due to dependencies or resource constraints), you might silence related alerts until a fix can be implemented.

## Add Silence

Silences can be added from the notification page. Alternatively, if you're using the default slack notification templates, you get a silence button
on each notification.

![Silence Notification form](./silence-notification-form.png)

## Recursive mode

When a silence is recursively applied, it applies to all of its children.

Check warning on line 27 in mission-control/docs/notifications/concepts/silences.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] mission-control/docs/notifications/concepts/silences.mdx#L27

[Flanksource.Wordiness] Consider using 'all' instead of 'all of'.
Raw output
{"message": "[Flanksource.Wordiness] Consider using 'all' instead of 'all of'.", "location": {"path": "mission-control/docs/notifications/concepts/silences.mdx", "range": {"start": {"line": 27, "column": 54}}}, "severity": "WARNING"}
So silencing a namespace would silence all deployments, statefulsets, pods, etc in that namespace.

Check failure on line 28 in mission-control/docs/notifications/concepts/silences.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] mission-control/docs/notifications/concepts/silences.mdx#L28

[Flanksource.Spelling] Is 'statefulsets' spelled correctly? Is it missing code formatting?
Raw output
{"message": "[Flanksource.Spelling] Is 'statefulsets' spelled correctly? Is it missing code formatting?", "location": {"path": "mission-control/docs/notifications/concepts/silences.mdx", "range": {"start": {"line": 28, "column": 57}}}, "severity": "ERROR"}
32 changes: 32 additions & 0 deletions mission-control/docs/notifications/concepts/wait-for.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: Wait For
---

Kubernetes clusters and similar dynamic systems may experience temporary discrepancies between the actual and intended state of resources.
For example, a deployment could momentarily appear unhealthy during a scaling operation.
If alerts are configured for `config.unhealthy` events, these transient state fluctuations might lead to an overwhelming number of unnecessary notifications.

To address this issue, you can utilize the waitFor parameter.
This feature allows you to define a delay before sending notifications for specific events.
After an event occurs, the system will recheck its status following the specified wait period. Only if the undesired state persists will a notification be triggered.

Check warning on line 11 in mission-control/docs/notifications/concepts/wait-for.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] mission-control/docs/notifications/concepts/wait-for.mdx#L11

[Flanksource.FutureTense] Use present tense verbs, not future tense verbs like 'will'. Say '(event) happens' instead of '(event) will happen'.
Raw output
{"message": "[Flanksource.FutureTense] Use present tense verbs, not future tense verbs like 'will'. Say '(event) happens' instead of '(event) will happen'.", "location": {"path": "mission-control/docs/notifications/concepts/wait-for.mdx", "range": {"start": {"line": 11, "column": 35}}}, "severity": "WARNING"}

Check warning on line 11 in mission-control/docs/notifications/concepts/wait-for.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] mission-control/docs/notifications/concepts/wait-for.mdx#L11

[Flanksource.ProfanityUnlikely] Be careful with 'period', it's profane in some cases.
Raw output
{"message": "[Flanksource.ProfanityUnlikely] Be careful with 'period', it's profane in some cases.", "location": {"path": "mission-control/docs/notifications/concepts/wait-for.mdx", "range": {"start": {"line": 11, "column": 88}}}, "severity": "WARNING"}

Check warning on line 11 in mission-control/docs/notifications/concepts/wait-for.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] mission-control/docs/notifications/concepts/wait-for.mdx#L11

[Flanksource.FutureTense] Use present tense verbs, not future tense verbs like 'will'. Say '(event) happens' instead of '(event) will happen'.
Raw output
{"message": "[Flanksource.FutureTense] Use present tense verbs, not future tense verbs like 'will'. Say '(event) happens' instead of '(event) will happen'.", "location": {"path": "mission-control/docs/notifications/concepts/wait-for.mdx", "range": {"start": {"line": 11, "column": 133}}}, "severity": "WARNING"}

:::info
`waitFor` is only applicable on health related events
:::

This approach helps reduce unnecessary notifications caused by transient state changes, ensuring you're alerted only to persistent issues.


```yaml title='notify-unhealthy-deployments.yaml' {8}
apiVersion: mission-control.flanksource.com/v1
kind: Notification
metadata:
name: deployment-unhealthy-alerts
spec:
events:
- config.unhealthy
waitFor: 2m
filter: config.type == 'Kubernetes::Deployment'
to:
email: [email protected]
```
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,29 @@
},
{
field: "to.properties",
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

View workflow job for this annotation

GitHub Actions / vale

[vale] mission-control/docs/reference/notifications/_notification.mdx#L35

[Flanksource.Ablist] When referring to a person, consider using 'has a disability', 'person with a disability', or 'people with disabilities' instead of 'special'.
Raw output
{"message": "[Flanksource.Ablist] When referring to a person, consider using 'has a disability', 'person with a disability', or 'people with disabilities' instead of 'special'.", "location": {"path": "mission-control/docs/reference/notifications/_notification.mdx", "range": {"start": {"line": 35, "column": 52}}}, "severity": "WARNING"}
scheme: "`map[string]string`"
},
{
field: "repeatInterval",

Check failure on line 39 in mission-control/docs/reference/notifications/_notification.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] mission-control/docs/reference/notifications/_notification.mdx#L39

[Flanksource.Spelling] Is 'repeatInterval' spelled correctly? Is it missing code formatting?
Raw output
{"message": "[Flanksource.Spelling] Is 'repeatInterval' spelled correctly? Is it missing code formatting?", "location": {"path": "mission-control/docs/reference/notifications/_notification.mdx", "range": {"start": {"line": 39, "column": 13}}}, "severity": "ERROR"}
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

View workflow job for this annotation

GitHub Actions / vale

[vale] mission-control/docs/reference/notifications/_notification.mdx#L40

[Flanksource.Spelling] Is 'succefully' spelled correctly? Is it missing code formatting?
Raw output
{"message": "[Flanksource.Spelling] Is 'succefully' spelled correctly? Is it missing code formatting?", "location": {"path": "mission-control/docs/reference/notifications/_notification.mdx", "range": {"start": {"line": 40, "column": 79}}}, "severity": "ERROR"}
scheme: "duration"
},
{
field: "repeatGroup",

Check failure on line 44 in mission-control/docs/reference/notifications/_notification.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] mission-control/docs/reference/notifications/_notification.mdx#L44

[Flanksource.Spelling] Is 'repeatGroup' spelled correctly? Is it missing code formatting?
Raw output
{"message": "[Flanksource.Spelling] Is 'repeatGroup' spelled correctly? Is it missing code formatting?", "location": {"path": "mission-control/docs/reference/notifications/_notification.mdx", "range": {"start": {"line": 44, "column": 13}}}, "severity": "ERROR"}
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: "waitFor",
description: "The duration to delay sending a health-based notification.\n\nAfter this period, the health status is reassessed to confirm it hasn't changed, helping prevent false alarms from transient issues.",

Check warning on line 50 in mission-control/docs/reference/notifications/_notification.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] mission-control/docs/reference/notifications/_notification.mdx#L50

[Flanksource.ProfanityUnlikely] Be careful with 'period', it's profane in some cases.
Raw output
{"message": "[Flanksource.ProfanityUnlikely] Be careful with 'period', it's profane in some cases.", "location": {"path": "mission-control/docs/reference/notifications/_notification.mdx", "range": {"start": {"line": 50, "column": 92}}}, "severity": "WARNING"}
scheme: "duration"
},
{
field: "title",
description: "Channel dependent e.g. subject for email",
scheme: "GoTemplate",
templateEnv: [

Check failure on line 57 in mission-control/docs/reference/notifications/_notification.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] mission-control/docs/reference/notifications/_notification.mdx#L57

[Flanksource.Spelling] Is 'templateEnv' spelled correctly? Is it missing code formatting?
Raw output
{"message": "[Flanksource.Spelling] Is 'templateEnv' spelled correctly? Is it missing code formatting?", "location": {"path": "mission-control/docs/reference/notifications/_notification.mdx", "range": {"start": {"line": 57, "column": 5}}}, "severity": "ERROR"}
{"name": "CheckEvents", "url": "/reference/notifications/template_vars#check-health-env"},
{"name": "ConfigEvents", "url": "/reference/notifications/template_vars#config-health-env"},
{"name": "ComponentEvents", "url": "/reference/notifications/template_vars#component-health-env"},
Expand All @@ -59,7 +64,7 @@
field: "body",
description: "Channel dependent e.g. email body for email",
scheme: "GoTemplate",
templateEnv: [

Check failure on line 67 in mission-control/docs/reference/notifications/_notification.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] mission-control/docs/reference/notifications/_notification.mdx#L67

[Flanksource.Spelling] Is 'templateEnv' spelled correctly? Is it missing code formatting?
Raw output
{"message": "[Flanksource.Spelling] Is 'templateEnv' spelled correctly? Is it missing code formatting?", "location": {"path": "mission-control/docs/reference/notifications/_notification.mdx", "range": {"start": {"line": 67, "column": 5}}}, "severity": "ERROR"}
{"name": "CheckEvents", "url": "/reference/notifications/template_vars#check-health-env"},
{"name": "ConfigEvents", "url": "/reference/notifications/template_vars#config-health-env"},
{"name": "ComponentEvents", "url": "/reference/notifications/template_vars#component-health-env"},
Expand All @@ -67,9 +72,9 @@
},
{
field: "filter",
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 75 in mission-control/docs/reference/notifications/_notification.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] mission-control/docs/reference/notifications/_notification.mdx#L75

[Flanksource.FutureTense] Use present tense verbs, not future tense verbs like 'will'. Say '(event) happens' instead of '(event) will happen'.
Raw output
{"message": "[Flanksource.FutureTense] Use present tense verbs, not future tense verbs like 'will'. Say '(event) happens' instead of '(event) will happen'.", "location": {"path": "mission-control/docs/reference/notifications/_notification.mdx", "range": {"start": {"line": 75, "column": 124}}}, "severity": "WARNING"}
scheme: "CEL",
templateEnv: [

Check failure on line 77 in mission-control/docs/reference/notifications/_notification.mdx

View workflow job for this annotation

GitHub Actions / vale

[vale] mission-control/docs/reference/notifications/_notification.mdx#L77

[Flanksource.Spelling] Is 'templateEnv' spelled correctly? Is it missing code formatting?
Raw output
{"message": "[Flanksource.Spelling] Is 'templateEnv' spelled correctly? Is it missing code formatting?", "location": {"path": "mission-control/docs/reference/notifications/_notification.mdx", "range": {"start": {"line": 77, "column": 5}}}, "severity": "ERROR"}
{"name": "CheckEvents", "url": "/reference/notifications/template_vars#check-health-env"},
{"name": "ConfigEvents", "url": "/reference/notifications/template_vars#config-health-env"},
{"name": "ComponentEvents", "url": "/reference/notifications/template_vars#component-health-env"},
Expand Down
Loading