From 35f90c5f771b8c4308e171c342c475516a06d89d Mon Sep 17 00:00:00 2001 From: Pepe Cano <825430+ppcano@users.noreply.github.com> Date: Tue, 22 Apr 2025 22:16:14 +0200 Subject: [PATCH] [release-11.6.1] docs(alerting): add notification screenshots details in `Create and link alert rules to panels` (#104236) docs(alerting): add notification screenshots details in `Create and link alert rules to panels` (#102103) * format admonition * include mention to display panel screenshots in notifications (cherry picked from commit 65d047dd432c778fbee06fa8cb0e22184fd7e86f) --- .../link-alert-rules-to-panels.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/sources/alerting/alerting-rules/link-alert-rules-to-panels.md b/docs/sources/alerting/alerting-rules/link-alert-rules-to-panels.md index 346e876433d..4b401cd1d4e 100644 --- a/docs/sources/alerting/alerting-rules/link-alert-rules-to-panels.md +++ b/docs/sources/alerting/alerting-rules/link-alert-rules-to-panels.md @@ -33,6 +33,11 @@ refs: destination: /docs/grafana//alerting/monitor-status/view-alert-state/#view-alert-state-on-panels - pattern: /docs/grafana-cloud/ destination: /docs/grafana-cloud/alerting-and-irm/alerting/monitor-status/view-alert-state/#view-alert-state-on-panels + images-in-notifications: + - pattern: /docs/grafana/ + destination: /docs/grafana//alerting/configure-notifications/template-notifications/images-in-notifications/ + - pattern: /docs/grafana-cloud/ + destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/images-in-notifications/ --- # Create and link alert rules to panels @@ -41,13 +46,10 @@ Grafana allows you to link an alert rule to a dashboard panel. This can help you - Inform alert responders about where to investigate and which data to examine. - Visualize the alert state directly from dashboards. +- Include a screenshot of the panel in notification messages. An alert rule is linked to a panel by setting the [`__dashboardUid__` and `__panelId__` annotations](ref:annotations). Both annotations must be set together. -{{% admonition type="tutorial" %}} -For a hands-on example of integrating alert rules with dashboards, check out [Part 5 of our Get Started with Grafana Alerting tutorial](http://www.grafana.com/tutorials/alerting-get-started-pt5/). -{{% /admonition %}} - ## Link alert rules to panels When configuring the alert rule, you can set the dashboard and panel annotations as shown in this [video](https://youtu.be/ClLp-iSoaSY?si=qKWnvSVaQuvYcuw9&t=170). @@ -59,6 +61,8 @@ When configuring the alert rule, you can set the dashboard and panel annotations You can then [view the alert state on the panel](ref:view-alert-state-on-panels). +By default, notification messages include a link to the dashboard panel. Additionally, you can [enable displaying panel screenshots in notifications](ref:images-in-notifications). + {{< figure src="/media/docs/alerting/panel-displays-alert-state.png" max-width="1200px" caption="A panel displaying the alert status and state changes." >}} ## Create alert rules from panels @@ -75,6 +79,8 @@ To streamline alert creation, you can create an alert rule directly from a panel You can then [view the alert state on the panel](ref:view-alert-state-on-panels). +By default, notification messages include a link to the dashboard panel. Additionally, you can [enable displaying panel screenshots in notifications](ref:images-in-notifications). + {{% admonition type="note" %}} Changes to panel and alert rule queries aren't synchronized. If you change a query, you have to update it in both the panel and the alert rule. {{% /admonition %}} @@ -86,3 +92,7 @@ This option is available only in [time series panels](ref:time-series-visualizat 1. Hover over the top-right corner of the panel and click the panel menu icon. 1. Click **Edit**. 1. Click the **Alert** tab to view existing alert rules or create a new one. + +{{< admonition type="tip" >}} +For a practical example that links a panel to an alert rule, refer to [Part 5 of our Get Started with Grafana Alerting tutorial](http://www.grafana.com/tutorials/alerting-get-started-pt5/). +{{% /admonition %}}