[release-11.5.3] Alerting docs: dynamic label changes (#101866)

Alerting docs: dynamic label changes (#101781)

(cherry picked from commit 23ccd2be95)

Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
pull/101872/head
grafana-delivery-bot[bot] 4 months ago committed by GitHub
parent dcb1180f28
commit 1bcc80daa7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      docs/sources/alerting/alerting-rules/templates/_index.md
  2. 4
      docs/sources/alerting/alerting-rules/templates/examples.md
  3. 14
      docs/sources/shared/alerts/note-dynamic-labels.md

@ -190,9 +190,7 @@ low
In this example, the value of the `severity` label is determined by the query value, and the possible options are `critical`, `high`, `medium`, or `low`. You can then use the `severity` label to change their notifications—for instance, sending `critical` alerts immediately or routing `low` alerts to a specific team for further review.
{{% admonition type="note" %}}
You should avoid displaying query values in labels, as this may create numerous unique alert instances—one for each distinct label value. Instead, use annotations for query values.
{{% /admonition %}}
{{< docs/shared lookup="alerts/note-dynamic-labels.md" source="grafana" version="<GRAFANA_VERSION>" >}}
### How to template a label

@ -209,9 +209,7 @@ In this example, the `severity` label is determined by the query value:
You can then use the `severity` label to control how alerts are handled. For instance, you could send `critical` alerts immediately, while routing `low` severity alerts to a team for further investigation.
{{% admonition type="note" %}}
You should avoid displaying query values in labels, as this may create many alert instances—one for each distinct label value. Instead, use annotations to convey query values.
{{% /admonition %}}
{{< docs/shared lookup="alerts/note-dynamic-labels.md" source="grafana" version="<GRAFANA_VERSION>" >}}
### Based on query label

@ -0,0 +1,14 @@
---
labels:
products:
- oss
title: 'Note Dynamic labels'
---
{{% admonition type="note" %}}
An alert instance is uniquely identified by its set of labels.
- Avoid displaying query values in labels, as this can create numerous alert instances—one for each distinct label set. Instead, use annotations for query values.
- If a templated label's value changes, it maps to a different alert instance, and the previous instance transitions to the `No data` state when its label value is no longer present.
{{% /admonition %}}
Loading…
Cancel
Save