docs(alerting): fix annotation names for panel links in alerts (#103471)

This commit is contained in:
Pepe Cano
2025-04-08 07:09:48 +02:00
committed by GitHub
parent a84e96fba2
commit 3cc2c1509b
5 changed files with 23 additions and 23 deletions
@@ -48,7 +48,7 @@ Grafana allows you to link an alert rule to a dashboard panel. This can help you
- 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.
An alert rule is linked to a panel by setting the [`__dashboardUid__` and `__panelId__` annotations](ref:annotations). Both annotations must be set together.
## Link alert rules to panels
@@ -73,7 +73,7 @@ To streamline alert creation, you can create an alert rule directly from a panel
1. Hover over the top-right corner of a panel and click the panel menu icon.
1. From the dropdown menu, select **More...** > **New alert rule**.
1. This opens the **Edit rule** form and pre-fills some values:
- Sets the `dashboardUId` and `panelId` annotations to the corresponding dashboard and panel.
- Sets the annotations to the corresponding dashboard and panel.
- Sets the alert rule query using the panel query.
1. Complete the alert rule configuration and click **Save rule** to initiate the alert rule.
@@ -106,7 +106,7 @@ Both types of templates are written in the Go templating system. However, it's i
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.
Grafana includes several optional annotations, such as `description`, `summary`, and `runbook_url`, 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.
@@ -143,7 +143,7 @@ Annotations are displayed in Grafana and are included by default in notification
- `summary`: A short summary of what the alert has detected and why.
- `description`: A detailed description of what happened and what the alert does.
- `runbook_url`: The runbook page to guide operators managing a potential incident.
- `dashboardUId` and `panelId`: [Link the alert to a dashboard and panel](ref:link-alert-rules-to-panels) to facilitate alert investigation.
- `__dashboardUid__` and `__panelId__`: [Link the alert to a dashboard and panel](ref:link-alert-rules-to-panels) to facilitate alert investigation.
For example, you can edit the annotation `summary` to explain why the alert was triggered:
@@ -90,7 +90,7 @@ In this diagram:
[Annotations](ref:annotations) can be defined in the alert rule to add extra information to alert instances.
When creating an alert rule, Grafana suggests several optional annotations, such as `description`, `summary`, `runbook_url`, `dashboardUId` and `panelId`, which help identify and respond to alerts. You can also create custom annotations.
When creating an alert rule, Grafana suggests several optional annotations, such as `description`, `summary`, and `runbook_url`, which help identify and respond to alerts. You can also create custom annotations.
Annotations are key-value pairs, and their values can contain a combination of text and template code that is evaluated when the alert fires.