Skip to main content

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 from and until values in RFC3339 format or as date and time or date math expressions, such as now and now+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
note

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:

  1. Uses two selectors to target resources in the test or stage namespace.
  2. Sets the silence window from January 1, 2025, until February 1, 2025.
  3. 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:

  1. Uses types to target Kubernetes Job config items.
  2. Uses tagSelector to require the severity=low tag.
  3. Takes effect immediately and stays active until you remove it because it doesn't set from or until.

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:

  1. Uses source_event to match only config.unhealthy events.
  2. Uses config.type to match only MissionControl::Canary config items.
  3. Uses time.InTimeRange() with event_time to 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:

  1. Uses config.name to match the postgresql config item.
  2. Uses config.type to require the Kubernetes::StatefulSet type.
  3. Silences every event type for the matching StatefulSet until you remove the silence.

Silence notifications from RDS PostgreSQL instances

rds.yaml
apiVersion: 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:

  1. Uses config.type to target AWS RDS database instances.
  2. Requires the account-name=flanksource tag and the PostgreSQL engine.
  3. 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:

  1. Use the Silences page in the Mission Control UI.
  2. Use the silence action in a Slack notification that uses a default template.
  3. Apply 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, as a date and time, or as a date math expression (for example, "now", "now+2h", or "2025-01-01")

string

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

[]ResourceSelector

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")

string

info

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:

  1. Selectors match resources by fields such as type, name, namespace, labels, and tags.
  2. Filters match event and resource data with CEL expressions.
  3. Specific resources target a config item, check, canary, or component selected in the Mission Control UI.
info

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
FilterDescription
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:

VariableDescriptionType
source_eventEvent that triggered the notification, such as config.unhealthy or check.passedstring
event_timeEvent creation timestamp, including its timezonetime.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.