Silences
Silences suppress notifications that match a target during an optional time window. A silence can include:
- A description of why you created the silence
- Optional
fromanduntilvalues in RFC3339 format or as date and time or date math expressions, such asnowandnow+2d - A target defined by a specific resource, selectors, or a CEL filter
- An option to include descendants of a selected config item or component
Mission Control records silenced notifications in the notification history for auditing purposes.
Examples
Selector-based silences
Silence notifications in test and stage namespaces
silence-test-env.yaml---
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
This example:
- Uses two
selectorsto target resources in thetestorstagenamespace. - Sets the silence window from January 1, 2025, until February 1, 2025.
- Silences every event type for resources that match either selector.
Silence low-severity Kubernetes Jobs
silence-test-deployments.yaml---
apiVersion: mission-control.flanksource.com/v1
kind: NotificationSilence
metadata:
name: low-severity-jobs
spec:
description: silence notification from all jobs with low severity
selectors:
- types:
- Kubernetes::Job
tagSelector: severity=low
This example:
- Uses
typesto target Kubernetes Job config items. - Uses
tagSelectorto require theseverity=lowtag. - Takes effect immediately and stays active until you remove it because it doesn't set
fromoruntil.
Filter-based silences
Silence canary unhealthy events in a daily time window
checks-date-window.yaml---
apiVersion: mission-control.flanksource.com/v1
kind: NotificationSilence
metadata:
name: canary-unhealthy-freeze-window
namespace: mc
spec:
description: >
Silence check notifications in a planned change freeze date window
filter: >
source_event == 'config.unhealthy'
&& config.type == 'MissionControl::Canary'
&& time.InTimeRange(event_time, "06:00", "07:00")
This example:
- Uses
source_eventto match onlyconfig.unhealthyevents. - Uses
config.typeto match onlyMissionControl::Canaryconfig items. - Uses
time.InTimeRange()withevent_timeto match events from 06:00 through 07:00 each day.
Silence notifications from a PostgreSQL StatefulSet
postgresql-sts.yaml---
apiVersion: mission-control.flanksource.com/v1
kind: NotificationSilence
metadata:
name: postgresql-sts
spec:
description: silence notification from all postgresql sts
filter: config.name == "postgresql" && config.type == "Kubernetes::StatefulSet"
This example:
- Uses
config.nameto match thepostgresqlconfig item. - Uses
config.typeto require theKubernetes::StatefulSettype. - Silences every event type for the matching StatefulSet until you remove the silence.
Silence notifications from RDS PostgreSQL instances
rds.yamlapiVersion: mission-control.flanksource.com/v1
kind: NotificationSilence
metadata:
name: aws-rds-readreplica-maintenance
spec:
description: >
Silence planned maintenance and brief healthy/unhealthy flaps
for RDS Postgres instances in flanksource account
filter: >
config.type == "AWS::RDS::DBInstance" &&
config.tags["account-name"] == "flanksource" &&
config.config.Engine == "postgres"
This example:
- Uses
config.typeto target AWS RDS database instances. - Requires the
account-name=flanksourcetag and the PostgreSQL engine. - Silences every event type for matching instances until you remove the silence. Apply and remove this silence around the intended maintenance period.
Use cases
- Planned maintenance or deployments: Silence notifications from a namespace or Helm release and, when applicable, its descendants.
- Noncritical resources: Suppress expected notifications from resources that don't require action.
- Known issues: Suppress notifications for issues that your team can't resolve immediately.
Create silences
You can create silences in these ways:
- Use the Silences page in the Mission Control UI.
- Use the silence action in a Slack notification that uses a default template.
- Apply a
NotificationSilencecustom resource.
| Field | Description | Scheme | Template Env |
|---|---|---|---|
description | A description explaining the purpose of the silence |
| |
filter | A CEL expression that determines whether to apply the silence. The silence is only applied if the filter evaluates to true. | ||
from | Start time of the silence period in RFC3339 format, as a date and time, or as a date math expression (for example, "now", "now+2h", or "2025-01-01") |
| |
recursive | When true, a silence that targets a specific config item or component also applies to its descendants. This field doesn't expand filter or selector matches and doesn't apply to a specific check or canary. | boolean | |
selectors | List of resource selectors to target specific resources | ||
until | End time of the silence period in RFC3339 format, as a date and time, or as a date math expression (for example, "now", "now+2d", or "2025-02-01") |
|
In a NotificationSilence custom resource, specify at least one filter or selector. When you specify both, Mission Control applies the silence when the filter returns true or any selector matches. Mission Control evaluates the selectors only when the filter returns false.
Resource selection
Each silence requires at least one targeting method:
- Selectors match resources by fields such as type, name, namespace, labels, and tags.
- Filters match event and resource data with CEL expressions.
- Specific resources target a config item, check, canary, or component selected in the Mission Control UI.
Mission Control combines a filter and selectors with OR logic. Mission Control applies the silence when the filter returns true or any selector matches. It evaluates selectors only when the filter returns false.
Selectors
Selectors use resource selectors to target resources. Mission Control combines fields in one selector with AND logic and combines multiple selectors with OR logic.
Filters
A filter is a CEL expression that returns a boolean value. Mission Control applies the silence when the filter returns true.
Filter examples
| Filter | Description |
|---|---|
check.type == 'http' | Matches HTTP checks |
regexp.Match("^check-[0-9]+", check.name) | Matches checks with names that start with check- |
config.name == "postgresql" && config.type == "Kubernetes::StatefulSet" | Matches a specific StatefulSet |
config.health == "unhealthy" && config.name.endsWith("-canary") && time.Since(timestamp(config.updated_at)) < duration("15m") | Matches recently updated, unhealthy canary config items |
source_event == 'config.unhealthy' && config.type == 'MissionControl::Canary' && time.InTimeRange(event_time, "06:00", "07:00") | Matches canary unhealthy events in a daily time window |
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 namespaces with the env=prod tag |
time.InTimeRange() accepts HH:MM or HH:MM:SS bounds and includes both bounds. It compares the time in the timezone carried by event_time without converting it. To match a range that crosses midnight, combine two calls with the || operator.
Available filter variables
All silence filters can use these event variables:
| Variable | Description | Type |
|---|---|---|
source_event | Event that triggered the notification, such as config.unhealthy or check.passed | string |
event_time | Event creation timestamp, including its timezone | time.Time |
The available resource variables depend on the event type:
Recursive mode
Recursive mode applies only when a silence targets a specific config item or component. When you set recursive: true, Mission Control also silences notifications from its descendants. For example, a silence that targets a Kubernetes Namespace config item can include its Deployments, StatefulSets, and Pods. A silence that targets a StatefulSet can include its Pods.
Recursive mode doesn't expand matches from filter or selectors, and it doesn't apply to a specific check or canary.