Skip to content

Commit 9abe837

Browse files
committed
docs: notification silences example and improvements
1 parent 9e9075f commit 9abe837

File tree

7 files changed

+48
-30
lines changed

7 files changed

+48
-30
lines changed

mission-control/docs/guide/notifications/concepts/silences.mdx

Lines changed: 42 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,51 +6,69 @@ sidebar_custom_props:
66

77
A silence is a way to temporarily suppress notifications. Each silence has:
88

9-
- A set duration - like an expiration timer
10-
- A scope - it can be applied to either:
11-
- Individual resources (a specific catalog, health check, or component)
12-
- Multiple matching resources using filters
9+
- A description - explaining why the silence was created
10+
- A duration - specified by `from` and `until` timestamps in RFC3339 format
11+
- A scope - defined through selectors and filters to target specific resources
12+
- A recursive flag - to apply silence to child resources
1313

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

18+
19+
```yaml title="" file=<rootDir>/modules/mission-control/fixtures/silences/silence-test-env.yaml
20+
```
21+
1822
## Use cases
1923

20-
- Planned maintenance or deployments. Eg: You can silence a namespace or a helm release and automatically silence notifications from all their children.
21-
- Non-critical resources: Notifications from resources that routinely trigger alerts but are expected and harmless can be silenced.
22-
- 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.
24+
- Planned maintenance or deployments - Silence notifications from a namespace or helm release and optionally all their children
25+
- Non-critical resources - Suppress notifications from resources that routinely trigger expected and harmless alerts
26+
- Known issues - Temporarily silence alerts for known issues that can't be immediately resolved due to dependencies or resource constraints
2327

24-
## Add Silence
28+
## Creating Silences
2529

26-
Silences can be added from the notification page. Alternatively, if you're using the default slack notification templates, you get a silence button
27-
on each notification.
30+
Silences can be created in multiple ways:
31+
1. Through the notification page UI
32+
2. Using the silence button on Slack notifications (when using default templates)
33+
3. By applying a NotificationSilence custom resource
2834

29-
![Silence Notification form](./silence-notification-form.png)
35+
### Resource Selection
36+
37+
Silences can target resources in two ways:
38+
39+
1. **Selectors**: Direct resource matching using kind and name
40+
2. **Filters**: Complex matching using CEL expressions
3041

31-
### Filters
42+
#### Selectors
3243

33-
A silence can optionally contain a filter. A filter is a cel-expression that results in a boolean value.
34-
If a filter return true, the notification is silenced.
44+
Selectors provide a straightforward way to target specific resources by their kind and name. Multiple selectors can be specified to target different resources.
3545

36-
#### Examples
46+
#### Filters
3747

38-
| Filter | description |
48+
A filter is a CEL expression that evaluates to a boolean value. The notification is silenced when the filter returns true. Filters provide powerful, flexible matching capabilities.
49+
50+
##### Filter Examples
51+
52+
| Filter | Description |
3953
|--------|-------------|
40-
| `check.type == 'http'` | silences only HTTP check related notifications. |
41-
| `regexp.Match("^check-[0-9]+", check.name)` | matches any check with the prefix `check-` |
42-
| `config.name == "postgresql" && config.type == "Kubernetes::StatefulSet"` | silences notifications from a stateful set named "postgresql" |
43-
| `config.type == "Kubernetes::Pod" && catalog.traverse(config.id, "Kubernetes::Namespace", "incoming").size > 0 && catalog.traverse(config.id, "Kubernetes::Namespace", "incoming")[0].tags.?env.orValue("") == "prod"` | matches kubernetes pod in a prod namespace |
54+
| `check.type == 'http'` | Silences HTTP check notifications |
55+
| `regexp.Match("^check-[0-9]+", check.name)` | Matches checks with prefix `check-` |
56+
| `config.name == "postgresql" && config.type == "Kubernetes::StatefulSet"` | Silences notifications from a specific StatefulSet |
57+
| `config.type == "Kubernetes::Pod" && catalog.traverse(config.id, "Kubernetes::Namespace", "incoming").size > 0 && catalog.traverse(config.id, "Kubernetes::Namespace", "incoming")[0].tags.?env.orValue("") == "prod"` | Matches pods in production namespaces |
4458

45-
#### Template variables
59+
##### Available Template Variables
4660

61+
Filters can reference these variables:
4762
- [CheckEvents](/reference/notifications/template_vars/checks)
4863
- [ConfigEvents](/reference/notifications/template_vars/config)
4964
- [ComponentEvents](/reference/notifications/template_vars/components)
5065

51-
### Recursive mode
66+
### Recursive Mode
5267

53-
When a silence is recursively applied, it applies to its all children.
54-
So silencing a namespace would silence all deployments, statefulsets, pods, etc in that namespace.
68+
When `recursive: true` is set, the silence applies to all child resources of the matched resources. For example:
69+
- Silencing a namespace affects all deployments, statefulsets, pods, etc. within it
70+
- Silencing a statefulset affects all its pods
71+
72+
![Silence Notification form](./silence-notification-form.png)
5573

5674

modules/mission-control

Submodule mission-control updated 63 files

0 commit comments

Comments
 (0)