Skip to main content

Silences

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

  • A description - explaining why the silence was created
  • A duration - specified by from and until timestamps in RFC3339 format, datetime or datemath expressions (e.g., now, now+2d)
  • A scope - defined through selectors and filters to target specific resources
  • A recursive flag - to apply silence to child resources
note

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

---
apiVersion: mission-control.flanksource.com/v1
kind: NotificationSilence
metadata:
name: test-env-silence
spec:
from: "2025-01-01"
until: "2025-02-01"
description: >
Silence notifications from all resources in test and stage namespaces
for the next 30 days
selectors:
- namespace: test
- namespace: stage

Use cases

  • Planned maintenance or deployments - Silence notifications from a namespace or helm release and optionally all their children
  • Non-critical resources - Suppress notifications from resources that routinely trigger expected and harmless alerts
  • Known issues - Temporarily silence alerts for known issues that can't be immediately resolved due to dependencies or resource constraints

Creating Silences

Silences can be created in multiple ways:

  1. Through the notification page UI
  2. Using the silence button on Slack notifications (when using default templates)
  3. By applying a NotificationSilence custom resource
FieldDescriptionSchemeTemplate Env
description

A description explaining the purpose of the silence

string

filter

A CEL expression that determines whether to apply the silence. The silence is only applied if the filter evaluates to true.

CEL

CheckEvents

ConfigEvents

from

Start time of the silence period in RFC3339 format, datetime or datemath expression (e.g., "now", "now+2h", "2025-01-01")

string

recursive

When true, the silence applies to all child resources of the matched resources. For example, silencing a namespace would silence all deployments, statefulsets, pods, etc. within it.

boolean

selectors

List of resource selectors to target specific resources

[]ResourceSelector

until

End time of the silence period in RFC3339 format, datetime or datemath expression (e.g., "now", "now+2d", "2025-02-01")

string

info

At least one of filter or selectors must be specified to target resources for the silence. When both are specified, filter takes precedence.

Resource Selection

Silences can target resources using selectors, filters, or a specific resource. At least one targeting method must be specified.

  1. Selectors: Direct resource matching using types, names, namespaces, labels, and tags
  2. Filters: Complex matching using CEL expressions
  3. Specific Resource: Selecting a specific config, check, canary, or component (via UI)
info

When both filter and selectors are specified, the filter is evaluated first. If the filter matches, the silence is applied. Selectors are only evaluated if the filter does not match.

Selectors

Selectors use Resource Selectors to target specific resources. Multiple selectors can be specified to target different resources.

Filters

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.

Filter Examples
FilterDescription
check.type == 'http'Silences HTTP check notifications
regexp.Match("^check-[0-9]+", check.name)Matches checks with prefix check-
config.name == "postgresql" && config.type == "Kubernetes::StatefulSet"Silences notifications from a specific StatefulSet
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
Available Template Variables

Filters can reference these variables:

Recursive Mode

When recursive: true is set, the silence applies to all child resources of the matched resources. For example:

  • Silencing a namespace affects all deployments, statefulsets, pods, etc. within it
  • Silencing a statefulset affects all its pods