The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
grafana/docs/sources/alerting/alerting-rules/templates/_index.md

225 lines
11 KiB

Alerting Docs: Update Alert rule and Notification Templating (#94069) * Update links to the new location of the Templates intro page * Set alert rule template structure * Update the `Template notifications` structure/sidebar * Move examples to examples pages * Update menu titles and URL paths * WIP reference * added intro to examples.md * reference page section intros * examples title * Template * Continue Alert Template Reference * example sections * Almost finish with Reference page * weight pages * WIP - template variables Intro * Edits Alert rule templates + Differences with notification templates * examples-draft-2 * how to map annotations to notif templates * examples v2 * moved example * Continue Template annotations and labels * Preview annotation templates * Complete `Template annotations and labels` * Update `Differences with notification templates` * Polish a bit `Differences with notification tempaltes` * added logic examples to `Examples` * Finish sharing Template language * Minor: set `anchor` link * Minor edit * Minor edit * Minor changes * Template language changes * Document missing functions for alert rule templates * 'Examples' v3 * `Examples` v3.1 * `Examples` v3.2 * added context/intro to `Examples` * added a how to section to `Examples` * moved legacy info in `Examples` * added examples, sections in `Examples` * formatting * examples v5 * examples v5.1 * Complete update to `Notification template reference` * Update `$values` description * moved steps to `index` * fixed urls * removed section in `examples` * added refs * fixed urls * refs fix * blended the use case into the explanation * Notification template reference: Minor readibility changes * Edit `$value` in Alert rule template reference * Edit `Manage notification templates * links to ref and lang pages * Minor copy changes * Edit Template annotation overview + Prepare Template notifications overview * `Select` vs `Choose` * Template Overview * Fix `heading` does not match `title` * examples v6 * examples v6.1 * Fix spell errors * Run `prettier --write` to fix md format errors * examples v7 * examples v7.1 * examples v7.2 * examples v7.4 * examples v7.5 * examples v7.6 * all pretty, no pity * Update alert rule examples * Complete `Labels and annotations template examples` * Minor changes * Use `.` notation instead of `index` in examples * rename `extendeddata` to `notificationdata` * Complete Notification examples * minor changes * Set `go` language when displaying template examples * Revert "minor changes" This reverts commit f647c55c8718a4b5c5ab51b3ef88ef0605de3c84. * Update example and admonition for consistency * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/shared/alerts/template-language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/shared/alerts/template-language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * use `add` instead of `enrich` * fix prettier content errors * minor copy change * Specify which Alert properties are exclusive to Grafana-managed alerts * Use `Monitor` instead of `Meta monitoring` * Be more detailed about notifation template limitations --------- Co-authored-by: tonypowa <tonypowa@gmail.com> Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
8 months ago
---
aliases:
- ../fundamentals/annotation-label/variables-label-annotation/ # /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/annotation-label/variables-label-annotation/
- ../alerting-rules/templating-labels-annotations/ # /docs/grafana/<GRAFANA_VERSION>/alerting-rules/templating-labels-annotations/
canonical: https://grafana.com/docs/grafana/latest/alerting/alerting-rules/templates/
description: Learn how to template annotations and labels to include data from queries and expressions in alert messages
keywords:
- grafana
- alerting
- templating
- labels
- annotations
labels:
products:
- cloud
- enterprise
- oss
title: Template annotations and labels
weight: 500
refs:
reference-labels:
Alerting Docs: Update Alert rule and Notification Templating (#94069) * Update links to the new location of the Templates intro page * Set alert rule template structure * Update the `Template notifications` structure/sidebar * Move examples to examples pages * Update menu titles and URL paths * WIP reference * added intro to examples.md * reference page section intros * examples title * Template * Continue Alert Template Reference * example sections * Almost finish with Reference page * weight pages * WIP - template variables Intro * Edits Alert rule templates + Differences with notification templates * examples-draft-2 * how to map annotations to notif templates * examples v2 * moved example * Continue Template annotations and labels * Preview annotation templates * Complete `Template annotations and labels` * Update `Differences with notification templates` * Polish a bit `Differences with notification tempaltes` * added logic examples to `Examples` * Finish sharing Template language * Minor: set `anchor` link * Minor edit * Minor edit * Minor changes * Template language changes * Document missing functions for alert rule templates * 'Examples' v3 * `Examples` v3.1 * `Examples` v3.2 * added context/intro to `Examples` * added a how to section to `Examples` * moved legacy info in `Examples` * added examples, sections in `Examples` * formatting * examples v5 * examples v5.1 * Complete update to `Notification template reference` * Update `$values` description * moved steps to `index` * fixed urls * removed section in `examples` * added refs * fixed urls * refs fix * blended the use case into the explanation * Notification template reference: Minor readibility changes * Edit `$value` in Alert rule template reference * Edit `Manage notification templates * links to ref and lang pages * Minor copy changes * Edit Template annotation overview + Prepare Template notifications overview * `Select` vs `Choose` * Template Overview * Fix `heading` does not match `title` * examples v6 * examples v6.1 * Fix spell errors * Run `prettier --write` to fix md format errors * examples v7 * examples v7.1 * examples v7.2 * examples v7.4 * examples v7.5 * examples v7.6 * all pretty, no pity * Update alert rule examples * Complete `Labels and annotations template examples` * Minor changes * Use `.` notation instead of `index` in examples * rename `extendeddata` to `notificationdata` * Complete Notification examples * minor changes * Set `go` language when displaying template examples * Revert "minor changes" This reverts commit f647c55c8718a4b5c5ab51b3ef88ef0605de3c84. * Update example and admonition for consistency * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/shared/alerts/template-language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/shared/alerts/template-language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * use `add` instead of `enrich` * fix prettier content errors * minor copy change * Specify which Alert properties are exclusive to Grafana-managed alerts * Use `Monitor` instead of `Meta monitoring` * Be more detailed about notifation template limitations --------- Co-authored-by: tonypowa <tonypowa@gmail.com> Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
8 months ago
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templates/reference/#labels
Alerting Docs: Update Alert rule and Notification Templating (#94069) * Update links to the new location of the Templates intro page * Set alert rule template structure * Update the `Template notifications` structure/sidebar * Move examples to examples pages * Update menu titles and URL paths * WIP reference * added intro to examples.md * reference page section intros * examples title * Template * Continue Alert Template Reference * example sections * Almost finish with Reference page * weight pages * WIP - template variables Intro * Edits Alert rule templates + Differences with notification templates * examples-draft-2 * how to map annotations to notif templates * examples v2 * moved example * Continue Template annotations and labels * Preview annotation templates * Complete `Template annotations and labels` * Update `Differences with notification templates` * Polish a bit `Differences with notification tempaltes` * added logic examples to `Examples` * Finish sharing Template language * Minor: set `anchor` link * Minor edit * Minor edit * Minor changes * Template language changes * Document missing functions for alert rule templates * 'Examples' v3 * `Examples` v3.1 * `Examples` v3.2 * added context/intro to `Examples` * added a how to section to `Examples` * moved legacy info in `Examples` * added examples, sections in `Examples` * formatting * examples v5 * examples v5.1 * Complete update to `Notification template reference` * Update `$values` description * moved steps to `index` * fixed urls * removed section in `examples` * added refs * fixed urls * refs fix * blended the use case into the explanation * Notification template reference: Minor readibility changes * Edit `$value` in Alert rule template reference * Edit `Manage notification templates * links to ref and lang pages * Minor copy changes * Edit Template annotation overview + Prepare Template notifications overview * `Select` vs `Choose` * Template Overview * Fix `heading` does not match `title` * examples v6 * examples v6.1 * Fix spell errors * Run `prettier --write` to fix md format errors * examples v7 * examples v7.1 * examples v7.2 * examples v7.4 * examples v7.5 * examples v7.6 * all pretty, no pity * Update alert rule examples * Complete `Labels and annotations template examples` * Minor changes * Use `.` notation instead of `index` in examples * rename `extendeddata` to `notificationdata` * Complete Notification examples * minor changes * Set `go` language when displaying template examples * Revert "minor changes" This reverts commit f647c55c8718a4b5c5ab51b3ef88ef0605de3c84. * Update example and admonition for consistency * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/shared/alerts/template-language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/shared/alerts/template-language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * use `add` instead of `enrich` * fix prettier content errors * minor copy change * Specify which Alert properties are exclusive to Grafana-managed alerts * Use `Monitor` instead of `Meta monitoring` * Be more detailed about notifation template limitations --------- Co-authored-by: tonypowa <tonypowa@gmail.com> Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
8 months ago
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templates/reference/#labels
reference-values:
Alerting Docs: Update Alert rule and Notification Templating (#94069) * Update links to the new location of the Templates intro page * Set alert rule template structure * Update the `Template notifications` structure/sidebar * Move examples to examples pages * Update menu titles and URL paths * WIP reference * added intro to examples.md * reference page section intros * examples title * Template * Continue Alert Template Reference * example sections * Almost finish with Reference page * weight pages * WIP - template variables Intro * Edits Alert rule templates + Differences with notification templates * examples-draft-2 * how to map annotations to notif templates * examples v2 * moved example * Continue Template annotations and labels * Preview annotation templates * Complete `Template annotations and labels` * Update `Differences with notification templates` * Polish a bit `Differences with notification tempaltes` * added logic examples to `Examples` * Finish sharing Template language * Minor: set `anchor` link * Minor edit * Minor edit * Minor changes * Template language changes * Document missing functions for alert rule templates * 'Examples' v3 * `Examples` v3.1 * `Examples` v3.2 * added context/intro to `Examples` * added a how to section to `Examples` * moved legacy info in `Examples` * added examples, sections in `Examples` * formatting * examples v5 * examples v5.1 * Complete update to `Notification template reference` * Update `$values` description * moved steps to `index` * fixed urls * removed section in `examples` * added refs * fixed urls * refs fix * blended the use case into the explanation * Notification template reference: Minor readibility changes * Edit `$value` in Alert rule template reference * Edit `Manage notification templates * links to ref and lang pages * Minor copy changes * Edit Template annotation overview + Prepare Template notifications overview * `Select` vs `Choose` * Template Overview * Fix `heading` does not match `title` * examples v6 * examples v6.1 * Fix spell errors * Run `prettier --write` to fix md format errors * examples v7 * examples v7.1 * examples v7.2 * examples v7.4 * examples v7.5 * examples v7.6 * all pretty, no pity * Update alert rule examples * Complete `Labels and annotations template examples` * Minor changes * Use `.` notation instead of `index` in examples * rename `extendeddata` to `notificationdata` * Complete Notification examples * minor changes * Set `go` language when displaying template examples * Revert "minor changes" This reverts commit f647c55c8718a4b5c5ab51b3ef88ef0605de3c84. * Update example and admonition for consistency * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/shared/alerts/template-language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/shared/alerts/template-language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * use `add` instead of `enrich` * fix prettier content errors * minor copy change * Specify which Alert properties are exclusive to Grafana-managed alerts * Use `Monitor` instead of `Meta monitoring` * Be more detailed about notifation template limitations --------- Co-authored-by: tonypowa <tonypowa@gmail.com> Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
8 months ago
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templates/reference/#values
Alerting Docs: Update Alert rule and Notification Templating (#94069) * Update links to the new location of the Templates intro page * Set alert rule template structure * Update the `Template notifications` structure/sidebar * Move examples to examples pages * Update menu titles and URL paths * WIP reference * added intro to examples.md * reference page section intros * examples title * Template * Continue Alert Template Reference * example sections * Almost finish with Reference page * weight pages * WIP - template variables Intro * Edits Alert rule templates + Differences with notification templates * examples-draft-2 * how to map annotations to notif templates * examples v2 * moved example * Continue Template annotations and labels * Preview annotation templates * Complete `Template annotations and labels` * Update `Differences with notification templates` * Polish a bit `Differences with notification tempaltes` * added logic examples to `Examples` * Finish sharing Template language * Minor: set `anchor` link * Minor edit * Minor edit * Minor changes * Template language changes * Document missing functions for alert rule templates * 'Examples' v3 * `Examples` v3.1 * `Examples` v3.2 * added context/intro to `Examples` * added a how to section to `Examples` * moved legacy info in `Examples` * added examples, sections in `Examples` * formatting * examples v5 * examples v5.1 * Complete update to `Notification template reference` * Update `$values` description * moved steps to `index` * fixed urls * removed section in `examples` * added refs * fixed urls * refs fix * blended the use case into the explanation * Notification template reference: Minor readibility changes * Edit `$value` in Alert rule template reference * Edit `Manage notification templates * links to ref and lang pages * Minor copy changes * Edit Template annotation overview + Prepare Template notifications overview * `Select` vs `Choose` * Template Overview * Fix `heading` does not match `title` * examples v6 * examples v6.1 * Fix spell errors * Run `prettier --write` to fix md format errors * examples v7 * examples v7.1 * examples v7.2 * examples v7.4 * examples v7.5 * examples v7.6 * all pretty, no pity * Update alert rule examples * Complete `Labels and annotations template examples` * Minor changes * Use `.` notation instead of `index` in examples * rename `extendeddata` to `notificationdata` * Complete Notification examples * minor changes * Set `go` language when displaying template examples * Revert "minor changes" This reverts commit f647c55c8718a4b5c5ab51b3ef88ef0605de3c84. * Update example and admonition for consistency * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/shared/alerts/template-language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/shared/alerts/template-language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * use `add` instead of `enrich` * fix prettier content errors * minor copy change * Specify which Alert properties are exclusive to Grafana-managed alerts * Use `Monitor` instead of `Meta monitoring` * Be more detailed about notifation template limitations --------- Co-authored-by: tonypowa <tonypowa@gmail.com> Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
8 months ago
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templates/reference/#values
Alerting Docs: Update Alert rule and Notification Templating (#94069) * Update links to the new location of the Templates intro page * Set alert rule template structure * Update the `Template notifications` structure/sidebar * Move examples to examples pages * Update menu titles and URL paths * WIP reference * added intro to examples.md * reference page section intros * examples title * Template * Continue Alert Template Reference * example sections * Almost finish with Reference page * weight pages * WIP - template variables Intro * Edits Alert rule templates + Differences with notification templates * examples-draft-2 * how to map annotations to notif templates * examples v2 * moved example * Continue Template annotations and labels * Preview annotation templates * Complete `Template annotations and labels` * Update `Differences with notification templates` * Polish a bit `Differences with notification tempaltes` * added logic examples to `Examples` * Finish sharing Template language * Minor: set `anchor` link * Minor edit * Minor edit * Minor changes * Template language changes * Document missing functions for alert rule templates * 'Examples' v3 * `Examples` v3.1 * `Examples` v3.2 * added context/intro to `Examples` * added a how to section to `Examples` * moved legacy info in `Examples` * added examples, sections in `Examples` * formatting * examples v5 * examples v5.1 * Complete update to `Notification template reference` * Update `$values` description * moved steps to `index` * fixed urls * removed section in `examples` * added refs * fixed urls * refs fix * blended the use case into the explanation * Notification template reference: Minor readibility changes * Edit `$value` in Alert rule template reference * Edit `Manage notification templates * links to ref and lang pages * Minor copy changes * Edit Template annotation overview + Prepare Template notifications overview * `Select` vs `Choose` * Template Overview * Fix `heading` does not match `title` * examples v6 * examples v6.1 * Fix spell errors * Run `prettier --write` to fix md format errors * examples v7 * examples v7.1 * examples v7.2 * examples v7.4 * examples v7.5 * examples v7.6 * all pretty, no pity * Update alert rule examples * Complete `Labels and annotations template examples` * Minor changes * Use `.` notation instead of `index` in examples * rename `extendeddata` to `notificationdata` * Complete Notification examples * minor changes * Set `go` language when displaying template examples * Revert "minor changes" This reverts commit f647c55c8718a4b5c5ab51b3ef88ef0605de3c84. * Update example and admonition for consistency * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/shared/alerts/template-language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/shared/alerts/template-language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * use `add` instead of `enrich` * fix prettier content errors * minor copy change * Specify which Alert properties are exclusive to Grafana-managed alerts * Use `Monitor` instead of `Meta monitoring` * Be more detailed about notifation template limitations --------- Co-authored-by: tonypowa <tonypowa@gmail.com> Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
8 months ago
annotations:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rules/annotation-label/#annotations
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/annotation-label/#annotations
explore:
- pattern: /docs/
destination: /docs/grafana/<GRAFANA_VERSION>/explore/
intro-to-templates:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/templates/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/templates/
alert-rule-template-reference:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templates/reference/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templates/reference/
alert-rule-template-examples:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templates/examples/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templates/examples/
notification-template-reference:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/reference/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/reference/
notification-data-reference:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/reference/#notification-data
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/reference/#notification-data
view-alert-state:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/monitor-status/view-alert-state/
Alerting Docs: Update Alert rule and Notification Templating (#94069) * Update links to the new location of the Templates intro page * Set alert rule template structure * Update the `Template notifications` structure/sidebar * Move examples to examples pages * Update menu titles and URL paths * WIP reference * added intro to examples.md * reference page section intros * examples title * Template * Continue Alert Template Reference * example sections * Almost finish with Reference page * weight pages * WIP - template variables Intro * Edits Alert rule templates + Differences with notification templates * examples-draft-2 * how to map annotations to notif templates * examples v2 * moved example * Continue Template annotations and labels * Preview annotation templates * Complete `Template annotations and labels` * Update `Differences with notification templates` * Polish a bit `Differences with notification tempaltes` * added logic examples to `Examples` * Finish sharing Template language * Minor: set `anchor` link * Minor edit * Minor edit * Minor changes * Template language changes * Document missing functions for alert rule templates * 'Examples' v3 * `Examples` v3.1 * `Examples` v3.2 * added context/intro to `Examples` * added a how to section to `Examples` * moved legacy info in `Examples` * added examples, sections in `Examples` * formatting * examples v5 * examples v5.1 * Complete update to `Notification template reference` * Update `$values` description * moved steps to `index` * fixed urls * removed section in `examples` * added refs * fixed urls * refs fix * blended the use case into the explanation * Notification template reference: Minor readibility changes * Edit `$value` in Alert rule template reference * Edit `Manage notification templates * links to ref and lang pages * Minor copy changes * Edit Template annotation overview + Prepare Template notifications overview * `Select` vs `Choose` * Template Overview * Fix `heading` does not match `title` * examples v6 * examples v6.1 * Fix spell errors * Run `prettier --write` to fix md format errors * examples v7 * examples v7.1 * examples v7.2 * examples v7.4 * examples v7.5 * examples v7.6 * all pretty, no pity * Update alert rule examples * Complete `Labels and annotations template examples` * Minor changes * Use `.` notation instead of `index` in examples * rename `extendeddata` to `notificationdata` * Complete Notification examples * minor changes * Set `go` language when displaying template examples * Revert "minor changes" This reverts commit f647c55c8718a4b5c5ab51b3ef88ef0605de3c84. * Update example and admonition for consistency * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/shared/alerts/template-language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/shared/alerts/template-language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * use `add` instead of `enrich` * fix prettier content errors * minor copy change * Specify which Alert properties are exclusive to Grafana-managed alerts * Use `Monitor` instead of `Meta monitoring` * Be more detailed about notifation template limitations --------- Co-authored-by: tonypowa <tonypowa@gmail.com> Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
8 months ago
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/monitor-status/view-alert-state/
Alerting Docs: Update Alert rule and Notification Templating (#94069) * Update links to the new location of the Templates intro page * Set alert rule template structure * Update the `Template notifications` structure/sidebar * Move examples to examples pages * Update menu titles and URL paths * WIP reference * added intro to examples.md * reference page section intros * examples title * Template * Continue Alert Template Reference * example sections * Almost finish with Reference page * weight pages * WIP - template variables Intro * Edits Alert rule templates + Differences with notification templates * examples-draft-2 * how to map annotations to notif templates * examples v2 * moved example * Continue Template annotations and labels * Preview annotation templates * Complete `Template annotations and labels` * Update `Differences with notification templates` * Polish a bit `Differences with notification tempaltes` * added logic examples to `Examples` * Finish sharing Template language * Minor: set `anchor` link * Minor edit * Minor edit * Minor changes * Template language changes * Document missing functions for alert rule templates * 'Examples' v3 * `Examples` v3.1 * `Examples` v3.2 * added context/intro to `Examples` * added a how to section to `Examples` * moved legacy info in `Examples` * added examples, sections in `Examples` * formatting * examples v5 * examples v5.1 * Complete update to `Notification template reference` * Update `$values` description * moved steps to `index` * fixed urls * removed section in `examples` * added refs * fixed urls * refs fix * blended the use case into the explanation * Notification template reference: Minor readibility changes * Edit `$value` in Alert rule template reference * Edit `Manage notification templates * links to ref and lang pages * Minor copy changes * Edit Template annotation overview + Prepare Template notifications overview * `Select` vs `Choose` * Template Overview * Fix `heading` does not match `title` * examples v6 * examples v6.1 * Fix spell errors * Run `prettier --write` to fix md format errors * examples v7 * examples v7.1 * examples v7.2 * examples v7.4 * examples v7.5 * examples v7.6 * all pretty, no pity * Update alert rule examples * Complete `Labels and annotations template examples` * Minor changes * Use `.` notation instead of `index` in examples * rename `extendeddata` to `notificationdata` * Complete Notification examples * minor changes * Set `go` language when displaying template examples * Revert "minor changes" This reverts commit f647c55c8718a4b5c5ab51b3ef88ef0605de3c84. * Update example and admonition for consistency * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/shared/alerts/template-language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/shared/alerts/template-language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * use `add` instead of `enrich` * fix prettier content errors * minor copy change * Specify which Alert properties are exclusive to Grafana-managed alerts * Use `Monitor` instead of `Meta monitoring` * Be more detailed about notifation template limitations --------- Co-authored-by: tonypowa <tonypowa@gmail.com> Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
8 months ago
preview-notifications:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/manage-notification-templates/#preview-notification-templates
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/manage-notification-templates/#preview-notification-templates
labels:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/latest/alerting/fundamentals/alert-rules/annotation-label/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/annotation-label/
Alerting Docs: Update Alert rule and Notification Templating (#94069) * Update links to the new location of the Templates intro page * Set alert rule template structure * Update the `Template notifications` structure/sidebar * Move examples to examples pages * Update menu titles and URL paths * WIP reference * added intro to examples.md * reference page section intros * examples title * Template * Continue Alert Template Reference * example sections * Almost finish with Reference page * weight pages * WIP - template variables Intro * Edits Alert rule templates + Differences with notification templates * examples-draft-2 * how to map annotations to notif templates * examples v2 * moved example * Continue Template annotations and labels * Preview annotation templates * Complete `Template annotations and labels` * Update `Differences with notification templates` * Polish a bit `Differences with notification tempaltes` * added logic examples to `Examples` * Finish sharing Template language * Minor: set `anchor` link * Minor edit * Minor edit * Minor changes * Template language changes * Document missing functions for alert rule templates * 'Examples' v3 * `Examples` v3.1 * `Examples` v3.2 * added context/intro to `Examples` * added a how to section to `Examples` * moved legacy info in `Examples` * added examples, sections in `Examples` * formatting * examples v5 * examples v5.1 * Complete update to `Notification template reference` * Update `$values` description * moved steps to `index` * fixed urls * removed section in `examples` * added refs * fixed urls * refs fix * blended the use case into the explanation * Notification template reference: Minor readibility changes * Edit `$value` in Alert rule template reference * Edit `Manage notification templates * links to ref and lang pages * Minor copy changes * Edit Template annotation overview + Prepare Template notifications overview * `Select` vs `Choose` * Template Overview * Fix `heading` does not match `title` * examples v6 * examples v6.1 * Fix spell errors * Run `prettier --write` to fix md format errors * examples v7 * examples v7.1 * examples v7.2 * examples v7.4 * examples v7.5 * examples v7.6 * all pretty, no pity * Update alert rule examples * Complete `Labels and annotations template examples` * Minor changes * Use `.` notation instead of `index` in examples * rename `extendeddata` to `notificationdata` * Complete Notification examples * minor changes * Set `go` language when displaying template examples * Revert "minor changes" This reverts commit f647c55c8718a4b5c5ab51b3ef88ef0605de3c84. * Update example and admonition for consistency * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/shared/alerts/template-language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/shared/alerts/template-language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * use `add` instead of `enrich` * fix prettier content errors * minor copy change * Specify which Alert properties are exclusive to Grafana-managed alerts * Use `Monitor` instead of `Meta monitoring` * Be more detailed about notifation template limitations --------- Co-authored-by: tonypowa <tonypowa@gmail.com> Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
8 months ago
---
# Template annotations and labels
You can use templates to customize alert and notification messages, including dynamic data from alert rule queries.
In Grafana Alerting, you can template alert messages in two ways.
1. **Template annotations and labels**: In the alert rule definition, you can template annotations and labels to include extra information from query data to the alert, adding meaningful details based on the query results.
1. **Template notifications**: You can template notifications to control the content and appearance of your notifications.
## How templating works
In this diagram, you can see the differences between both types of templates.
{{< figure src="/media/docs/alerting/how-notification-templates-works.png" max-width="1200px" alt="How templating works" >}}
Refer to [Templates Introduction](ref:intro-to-templates) for a more detailed explanation of this diagram.
Both types of templates are written in the Go templating system. However, it's important to understand that variables and functions used in notification templates are different from those used in annotation and label templates.
1. **Template annotations and labels**: These templates add extra information to individual alert instances. Template variables like [`$labels`](ref:reference-labels) and [`$values`](ref:reference-values) represent alert query data of the individual alert instance.
Alerting Docs: Update Alert rule and Notification Templating (#94069) * Update links to the new location of the Templates intro page * Set alert rule template structure * Update the `Template notifications` structure/sidebar * Move examples to examples pages * Update menu titles and URL paths * WIP reference * added intro to examples.md * reference page section intros * examples title * Template * Continue Alert Template Reference * example sections * Almost finish with Reference page * weight pages * WIP - template variables Intro * Edits Alert rule templates + Differences with notification templates * examples-draft-2 * how to map annotations to notif templates * examples v2 * moved example * Continue Template annotations and labels * Preview annotation templates * Complete `Template annotations and labels` * Update `Differences with notification templates` * Polish a bit `Differences with notification tempaltes` * added logic examples to `Examples` * Finish sharing Template language * Minor: set `anchor` link * Minor edit * Minor edit * Minor changes * Template language changes * Document missing functions for alert rule templates * 'Examples' v3 * `Examples` v3.1 * `Examples` v3.2 * added context/intro to `Examples` * added a how to section to `Examples` * moved legacy info in `Examples` * added examples, sections in `Examples` * formatting * examples v5 * examples v5.1 * Complete update to `Notification template reference` * Update `$values` description * moved steps to `index` * fixed urls * removed section in `examples` * added refs * fixed urls * refs fix * blended the use case into the explanation * Notification template reference: Minor readibility changes * Edit `$value` in Alert rule template reference * Edit `Manage notification templates * links to ref and lang pages * Minor copy changes * Edit Template annotation overview + Prepare Template notifications overview * `Select` vs `Choose` * Template Overview * Fix `heading` does not match `title` * examples v6 * examples v6.1 * Fix spell errors * Run `prettier --write` to fix md format errors * examples v7 * examples v7.1 * examples v7.2 * examples v7.4 * examples v7.5 * examples v7.6 * all pretty, no pity * Update alert rule examples * Complete `Labels and annotations template examples` * Minor changes * Use `.` notation instead of `index` in examples * rename `extendeddata` to `notificationdata` * Complete Notification examples * minor changes * Set `go` language when displaying template examples * Revert "minor changes" This reverts commit f647c55c8718a4b5c5ab51b3ef88ef0605de3c84. * Update example and admonition for consistency * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/shared/alerts/template-language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/shared/alerts/template-language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * use `add` instead of `enrich` * fix prettier content errors * minor copy change * Specify which Alert properties are exclusive to Grafana-managed alerts * Use `Monitor` instead of `Meta monitoring` * Be more detailed about notifation template limitations --------- Co-authored-by: tonypowa <tonypowa@gmail.com> Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
8 months ago
1. **Template notifications**: Notification templates format the notification content for a group of alerts. Variables like [`.Alerts`](ref:notification-data-reference) include all firing and resolved alerts in the notification.
## Template annotations
[Annotations](ref:annotations) add additional information to alert instances and are often used to help identify the alert and guide responders on how to address the issue.
Annotations are key-value pairs defined in the alert rule. They can contain plain text or template code that is evaluated when the alert fires.
Grafana includes several optional annotations, such as `description`, `summary`, `runbook_url`, `dashboardUId` and `panelId`, which can be edited in the alert rule. You can also create your custom annotations. For example, you might create a new annotation named `location` to report the location of the system that triggered the alert.
Here’s an example of a `summary` annotation explaining why the alert was triggered, using plain text.
```
CPU usage has exceeded 80% for the last 5 minutes.
```
However, if you want to display dynamic query values in annotations, you need to use template code. Common use cases include:
- Displaying the query value that triggered the alert.
- Highlighting label information that identifies the alert, such as the environment, instance, or region.
Alerting Docs: Update Alert rule and Notification Templating (#94069) * Update links to the new location of the Templates intro page * Set alert rule template structure * Update the `Template notifications` structure/sidebar * Move examples to examples pages * Update menu titles and URL paths * WIP reference * added intro to examples.md * reference page section intros * examples title * Template * Continue Alert Template Reference * example sections * Almost finish with Reference page * weight pages * WIP - template variables Intro * Edits Alert rule templates + Differences with notification templates * examples-draft-2 * how to map annotations to notif templates * examples v2 * moved example * Continue Template annotations and labels * Preview annotation templates * Complete `Template annotations and labels` * Update `Differences with notification templates` * Polish a bit `Differences with notification tempaltes` * added logic examples to `Examples` * Finish sharing Template language * Minor: set `anchor` link * Minor edit * Minor edit * Minor changes * Template language changes * Document missing functions for alert rule templates * 'Examples' v3 * `Examples` v3.1 * `Examples` v3.2 * added context/intro to `Examples` * added a how to section to `Examples` * moved legacy info in `Examples` * added examples, sections in `Examples` * formatting * examples v5 * examples v5.1 * Complete update to `Notification template reference` * Update `$values` description * moved steps to `index` * fixed urls * removed section in `examples` * added refs * fixed urls * refs fix * blended the use case into the explanation * Notification template reference: Minor readibility changes * Edit `$value` in Alert rule template reference * Edit `Manage notification templates * links to ref and lang pages * Minor copy changes * Edit Template annotation overview + Prepare Template notifications overview * `Select` vs `Choose` * Template Overview * Fix `heading` does not match `title` * examples v6 * examples v6.1 * Fix spell errors * Run `prettier --write` to fix md format errors * examples v7 * examples v7.1 * examples v7.2 * examples v7.4 * examples v7.5 * examples v7.6 * all pretty, no pity * Update alert rule examples * Complete `Labels and annotations template examples` * Minor changes * Use `.` notation instead of `index` in examples * rename `extendeddata` to `notificationdata` * Complete Notification examples * minor changes * Set `go` language when displaying template examples * Revert "minor changes" This reverts commit f647c55c8718a4b5c5ab51b3ef88ef0605de3c84. * Update example and admonition for consistency * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/shared/alerts/template-language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/shared/alerts/template-language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * use `add` instead of `enrich` * fix prettier content errors * minor copy change * Specify which Alert properties are exclusive to Grafana-managed alerts * Use `Monitor` instead of `Meta monitoring` * Be more detailed about notifation template limitations --------- Co-authored-by: tonypowa <tonypowa@gmail.com> Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
8 months ago
- Providing specific instructions based on query values.
- Customizing runbook links depending on query labels.
- Including contact information based on query labels.
Alerting Docs: Update Alert rule and Notification Templating (#94069) * Update links to the new location of the Templates intro page * Set alert rule template structure * Update the `Template notifications` structure/sidebar * Move examples to examples pages * Update menu titles and URL paths * WIP reference * added intro to examples.md * reference page section intros * examples title * Template * Continue Alert Template Reference * example sections * Almost finish with Reference page * weight pages * WIP - template variables Intro * Edits Alert rule templates + Differences with notification templates * examples-draft-2 * how to map annotations to notif templates * examples v2 * moved example * Continue Template annotations and labels * Preview annotation templates * Complete `Template annotations and labels` * Update `Differences with notification templates` * Polish a bit `Differences with notification tempaltes` * added logic examples to `Examples` * Finish sharing Template language * Minor: set `anchor` link * Minor edit * Minor edit * Minor changes * Template language changes * Document missing functions for alert rule templates * 'Examples' v3 * `Examples` v3.1 * `Examples` v3.2 * added context/intro to `Examples` * added a how to section to `Examples` * moved legacy info in `Examples` * added examples, sections in `Examples` * formatting * examples v5 * examples v5.1 * Complete update to `Notification template reference` * Update `$values` description * moved steps to `index` * fixed urls * removed section in `examples` * added refs * fixed urls * refs fix * blended the use case into the explanation * Notification template reference: Minor readibility changes * Edit `$value` in Alert rule template reference * Edit `Manage notification templates * links to ref and lang pages * Minor copy changes * Edit Template annotation overview + Prepare Template notifications overview * `Select` vs `Choose` * Template Overview * Fix `heading` does not match `title` * examples v6 * examples v6.1 * Fix spell errors * Run `prettier --write` to fix md format errors * examples v7 * examples v7.1 * examples v7.2 * examples v7.4 * examples v7.5 * examples v7.6 * all pretty, no pity * Update alert rule examples * Complete `Labels and annotations template examples` * Minor changes * Use `.` notation instead of `index` in examples * rename `extendeddata` to `notificationdata` * Complete Notification examples * minor changes * Set `go` language when displaying template examples * Revert "minor changes" This reverts commit f647c55c8718a4b5c5ab51b3ef88ef0605de3c84. * Update example and admonition for consistency * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/shared/alerts/template-language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/shared/alerts/template-language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/language.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/_index.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/alerting-rules/templates/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/examples.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> * use `add` instead of `enrich` * fix prettier content errors * minor copy change * Specify which Alert properties are exclusive to Grafana-managed alerts * Use `Monitor` instead of `Meta monitoring` * Be more detailed about notifation template limitations --------- Co-authored-by: tonypowa <tonypowa@gmail.com> Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
8 months ago
For instance, you can template the previous example to display the specific instance and CPU value that triggered the alert.
```
CPU usage for {{ $labels.instance }} has exceeded 80% ({{ $values.A.Value }}) for the last 5 minutes.
```
Alternatively, you can use the `index` function to print query values.
```
CPU usage for {{ index $labels "instance" }} has exceeded 80% ({{ index $values "A" }}) for the last 5 minutes.
```
The result of the annotation would be as follows.
```
CPU usage for Instance 1 has exceeded 80% (81.2345) for the last 5 minutes.
```
### How to template an annotation
Complete the following steps to template an annotation.
1. Navigate to **Alerts & IRM** -> **Alert rules** -> create or edit an alert rule.
1. Scroll down to the **Configure notification message** section.
1. Copy in your template in the corresponding annotation field (`summary`, `description`, `runbook_url`, `custom`).
### Preview annotation templates
You can template annotations when creating or editing an alert rule.
{{< figure src="/media/docs/alerting/alert-rule-using-annotation-template.png" max-width="1200px" alt="An alert rule templating the annotation summary" >}}
Two common methods are used to test and preview annotation templates:
1. Trigger the alert and [view the alert instance state in the Grafana UI](ref:view-alert-state), where all annotations of the alert instance are displayed.
1. Use a notification template that displays all annotations, then [preview the notification template](ref:preview-notifications) using the alert instance.
## Template labels
The set of [labels](ref:labels) for an alert instance is used to uniquely identify that alert among all other alert instances.
Labels determine how alerts are routed and managed for notifications, making their design key to the effectiveness of your alerting system.
Labels can be returned from an alert rule query, such as the `pod` label in a Kubernetes Prometheus query. You can also define additional labels in the alert rule to provide extra information for processing alerts.
Like annotations, labels are key-value pairs that can contain plain text or template code evaluated when the alert fires.
Template labels when the labels returned by your queries are insufficient. For instance:
- A new label based on a query value can group a subset of alerts differently, changing how notifications are sent.
- A new label based on a query value can be used in a notification policy to alter the notification contact point.
Here’s an example of templating a `severity` label based on the query value.
```
{{ if (gt $values.A.Value 90.0) -}}
critical
{{ else if (gt $values.A.Value 80.0) -}}
high
{{ else if (gt $values.A.Value 60.0) -}}
medium
{{ else -}}
low
{{- end }}
```
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 %}}
### How to template a label
Complete the following steps to template a label.
1. Navigate to **Alerts & IRM** -> **Alert rules** -> create or edit an alert rule.
1. Scroll down to the **Configure labels and notifications** section.
1. Click **+ Add labels**.
1. Enter a **key** that identifies the label.
1. Copy in your template in the **value** field.
### Preview label templates
You can template label values when creating or editing an alert rule.
To preview label values, select `Use notification policy`, and then click on `Preview routing`.
{{< figure src="/media/docs/alerting/alert-instance-routing-preview.png" max-width="1200px" alt="Routing preview displays label values" >}}
## More information
For further details on how to template alert rules, refer to:
- [Annotation and label template reference](ref:alert-rule-template-reference)
- [Annotation and label examples](ref:alert-rule-template-examples)
{{< admonition type="tip" >}}
For a practical example of templating, refer to our [Getting Started with Templating tutorial](https://grafana.com/tutorials/alerting-get-started-pt4/).
{{< /admonition >}}