From 1f802e14913bbd4dce148bc9c6c18a8c50aad4c9 Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Thu, 19 Aug 2021 09:28:46 -0400 Subject: [PATCH] Alerting/Docs: $labels and $values not available with classic condition (#38011) (#38072) fixes #37836 (cherry picked from commit d43d9207ee1ab6ab23a4832aebdcd7f05c1c152c) Co-authored-by: Kyle Brandt --- .../alerting-rules/create-grafana-managed-rule.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/sources/alerting/unified-alerting/alerting-rules/create-grafana-managed-rule.md b/docs/sources/alerting/unified-alerting/alerting-rules/create-grafana-managed-rule.md index 11605a3ad96..3ccfc14e65d 100644 --- a/docs/sources/alerting/unified-alerting/alerting-rules/create-grafana-managed-rule.md +++ b/docs/sources/alerting/unified-alerting/alerting-rules/create-grafana-managed-rule.md @@ -106,11 +106,11 @@ Labels are key value pairs that categorize or identify an alert. Labels are used The following template variables are available when expanding annotations and labels. -| Name | Description | -| ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| $labels | The labels from the query or condition. For example, `{{ $labels.instance }}` and `{{ $labels.job }}`. | -| $values | The values of all reduce and math expressions that were evaluated for this alert rule. For example, `{{ $values.A }}`, `{{ $values.A.Labels }}` and `{{ $values.A.Value }}` where `A` is the `refID` of the expression. | -| $value | The value string of the alert instance. For example, `[ var='A' labels={instance=foo} value=10 ]`. | +| Name | Description | +| ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| $labels | The labels from the query or condition. For example, `{{ $labels.instance }}` and `{{ $labels.job }}`. This is unavailable when the rule uses a classic condition. | +| $values | The values of all reduce and math expressions that were evaluated for this alert rule. For example, `{{ $values.A }}`, `{{ $values.A.Labels }}` and `{{ $values.A.Value }}` where `A` is the `refID` of the expression. This is unavailable when the rule uses a classic condition. | +| $value | The value string of the alert instance. For example, `[ var='A' labels={instance=foo} value=10 ]`. | ## Preview alerts