Silence
Shows how to create an alerting silence.
A silence stops notifications from one or more alerts for a fixed time window. The window
is defined with startsAt and endsAt (RFC3339, UTC), and the alerts to silence are
selected with matchers. Note that the endsAt must be in the future and more recent than startsAt.
The Grafana-assigned silence ID is stored back on the resource in the
grafana.integreatly.org/silence-id annotation as a JSON map of
<namespace>/<name> instance to silence ID. To adopt (import) a silence that already
exists in Grafana, pre-populate that annotation with the instance and existing silence ID;
the operator will update that silence instead of creating a new one.
To view the entire configuration that you can do within Silences, look at our API documentation .
To bind the silence directly to a single alert rule (creating a “rule-specific silence”), you must include the unique label matcher alert_rule_uid set to your alert rule’s UID
"matchers": [
{
"name": "__alert_rule_uid__",
"value": "d9x8a1b2c",
"isRegex": false,
"isEqual": true
}
],
Note to associate the alert to an alert rule the following conditions must be met:
- name must be exactly
__alert_rule_uid__ valuemust the exact alert guidisRegexmust be set tofalseisEqualmust be set totrue
- The finalizer runs and calls DeleteSilence(…) against each instance → ✅ this is firing (that’s exactly why you see them flip to “expired” instead of staying active).
- Grafana then keeps the expired silence in the list for a fixed 5-day retention, after which a background job (runs every ~15 min) permanently removes it.
For further info on silences see the Grafana documentation .
---
apiVersion: grafana.integreatly.org/v1beta1
kind: GrafanaSilence
metadata:
name: silence-sample
spec:
instanceSelector:
matchLabels:
dashboards: "grafana"
comment: "Silencing high CPU noise during scheduled database maintenance"
createdBy: "DevOps Team"
startsAt: "2026-06-23T20:00:00Z"
endsAt: "2099-06-23T22:00:00Z"
matchers:
- name: alertname
value: HighCPUUsage
isEqual: true
isRegex: false
- name: env
value: "prod|staging"
isEqual: true
isRegex: true
---
# To adopt an existing Grafana silence instead of creating a new one, set the annotation
# below to a JSON map of "<namespace>/<name>" Grafana instance -> silence ID. The operator
# seeds status.silenceIDs from it on the first reconcile and updates that silence in place;
# status.silenceIDs is the source of truth afterwards, so the annotation is ignored for any
# instance it already tracks.
#
# apiVersion: grafana.integreatly.org/v1beta1
# kind: GrafanaSilence
# metadata:
# name: silence-imported
# annotations:
# operator.grafana.com/adopt-silence-id: '{"default/grafana":"e6a4f8c2-1b3d-4f5a-9c8e-2d7b1a0f3e6c"}'
# spec:
# instanceSelector:
# matchLabels:
# dashboards: "grafana"
# comment: "Imported silence"
# createdBy: "DevOps Team"
# startsAt: "2026-06-23T20:00:00Z"
# endsAt: "2026-06-23T22:00:00Z"
# matchers:
# - name: alertname
# value: HighCPUUsage
# isEqual: true