Fix all the old usage of admonition syntax (#107098)

This commit is contained in:
Jack Baldry
2025-06-27 11:28:14 +01:00
committed by GitHub
parent 7307a2bdbe
commit a113d04fb9
161 changed files with 721 additions and 721 deletions
@@ -115,9 +115,9 @@ If you do not want to manage alert rules for a particular data source, go to its
Define a query to get the data you want to measure and a condition that needs to be met before an alert rule fires.
{{% admonition type="note" %}}
{{< admonition type="note" >}}
By default, new alert rules are Grafana-managed. To switch to **Data source-managed**, follow these instructions.
{{% /admonition %}}
{{< /admonition >}}
1. Select a Prometheus-based data source from the drop-down list.
@@ -81,9 +81,9 @@ 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" %}}
{{< 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 %}}
{{< /admonition >}}
## Access linked alert rules from panels
@@ -95,4 +95,4 @@ This option is available only in [time series panels](ref:time-series-visualizat
{{< 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 %}}
{{< /admonition >}}
@@ -72,9 +72,9 @@ At the start of notification templates, dot (`.`) refers to [Notification Data](
In annotation and label templates, dot (`.`) is initialized with all alert data. It’s recommended to use the [`$labels` and `$values` variables](ref:alert-rule-template-reference-variables) instead to directly access the alert labels and query values.
{{% admonition type="note" %}}
{{< admonition type="note" >}}
Dot (`.`) might refer to something else when used in a [range](#range), a [with](#with), or when writing [templates](#templates) used in other templates.
{{% /admonition %}}
{{< /admonition >}}
[//]: <> (The above section is not included in the shared file because `refs` links are not supported in shared files.)
@@ -78,9 +78,9 @@ When an alert instance is assigned to a notification policy, the notification po
- Controlling when notifications are sent using the [timing options](ref:policy-timing-options).
- Determining the [contact points](ref:configure-contact-points) that receive the alert notification.
{{% admonition type="note" %}}
{{< admonition type="note" >}}
The default notification policy and its child policies are assigned to a [specific Alertmanager](ref:alertmanager-architecture), and they cannot use contact points or mute timings from other Alertmanagers.
{{% /admonition %}}
{{< /admonition >}}
## Edit the default notification policy
@@ -133,9 +133,9 @@ On the **Contact Points** tab, you can:
- Export individual contact points or all contact points in JSON, YAML, or Terraform format.
- Delete contact points. Note that you cannot delete contact points that are in use by a notification policy. To proceed, either delete the notification policy or update it to use another contact point.
{{% admonition type="note" %}}
{{< admonition type="note" >}}
Contact points are assigned to a [specific Alertmanager](ref:configure-alertmanager) and cannot be used by notification policies in other Alertmanagers.
{{% /admonition %}}
{{< /admonition >}}
## Supported contact point integrations
@@ -37,11 +37,11 @@ For example, a team might run its own Alertmanager to manage notifications from
This setup avoids duplicating Alertmanager configurations for better maintenance.
{{% admonition type="note" %}}
{{< admonition type="note" >}}
To send all Grafana-managed alerts to an Alertmanager, add it as a data source and enable it to receive all alerts. With this setup, you can configure multiple Alertmanagers to receive all alerts.
For setup instructions, refer to [Configure Alertmanagers](ref:configure-alertmanagers).
{{% /admonition %}}
{{< /admonition >}}
## Configure an Alertmanager for a contact point
@@ -85,11 +85,11 @@ The notification message would look like this:
Description: This alert fires when a web server responds with more 5xx errors than is expected. This could be an issue with the web server or a backend service.
```
{{% admonition type="note" %}}
{{< admonition type="note" >}}
Avoid adding extra information about alert instances in notification templates, as this information will only be visible in the notification message.
Instead, you should [use annotations or labels](ref:template-annotations-and-labels) to add information directly to the alert, ensuring it's also visible in the alert state and alert history within Grafana. You can then print the new alert annotation or label in notification templates.
{{% /admonition %}}
{{< /admonition >}}
#### Select a notification template for a contact point
@@ -63,11 +63,11 @@ Notification templates allows you to change the default notification messages.
You can modify the content and format of notification messages. For example, you can customize the content to show only specific information or adjust the format to suit a particular contact point, such as Slack or Email.
{{% admonition type="note" %}}
{{< admonition type="note" >}}
Avoid adding extra information about alert instances in notification templates, as this information is only visible in the notification message.
Instead, you should [use annotations or labels](ref:template-annotations-and-labels) to add information directly to the alert, ensuring it's also visible in the alert state and alert history within Grafana. You can then print the new alert annotation or label in notification templates.
{{% /admonition %}}
{{< /admonition >}}
This page provides various examples illustrating how to template common notification messages. For more details about notification templates, refer to:
@@ -20,15 +20,15 @@ weight: 105
# Use images in notifications
{{% admonition type="note" %}}
{{< admonition type="note" >}}
Grafana Cloud users can request this feature by [opening a support ticket in the Cloud Portal](/profile/org#support).
{{% /admonition %}}
{{< /admonition >}}
Images in notifications helps recipients of alert notifications better understand why an alert has fired or resolved by including a screenshot of the panel associated with the alert.
{{% admonition type="note" %}}
{{< admonition type="note" >}}
This feature is not supported in Mimir or Loki, or when Grafana is configured to send alerts to other Alertmanagers such as the Prometheus Alertmanager.
{{% /admonition %}}
{{< /admonition >}}
When an alert is fired or resolved Grafana takes a screenshot of the panel associated with the alert. This is determined via the Dashboard UID and Panel ID annotations of the rule. Grafana cannot take a screenshot for alerts that are not associated with a panel.
@@ -60,9 +60,9 @@ Refer to the table at the end of this page for a list of contact points and thei
## Configuration
{{% admonition type="note" %}}
{{< admonition type="note" >}}
Grafana Cloud users can request this feature by [opening a support ticket in the Cloud Portal](/profile/org#support).
{{% /admonition %}}
{{< /admonition >}}
Having installed either the image rendering plugin, or set up Grafana to use a remote rendering service, set `capture` in `[unified_alerting.screenshots]` to `true`:
@@ -76,9 +76,9 @@ At the start of notification templates, dot (`.`) refers to [Notification Data](
In annotation and label templates, dot (`.`) is initialized with all alert data. It’s recommended to use the [`$labels` and `$values` variables](ref:alert-rule-template-reference-variables) instead to directly access the alert labels and query values.
{{% admonition type="note" %}}
{{< admonition type="note" >}}
Dot (`.`) might refer to something else when used in a [range](#range), a [with](#with), or when writing [templates](#templates) used in other templates.
{{% /admonition %}}
{{< /admonition >}}
[//]: <> (The above section is not included in the shared file because `refs` links are not supported in shared files.)
@@ -100,9 +100,9 @@ For more details on how to write notification templates, refer to the [template
Preview how your notification templates should look before using them in your contact points, helping you understand the result of the template you are creating as well as enabling you to fix any errors before saving it.
{{% admonition type="note" %}}
{{< admonition type="note" >}}
Notification template preview is only for Grafana Alertmanager.
{{% /admonition %}}
{{< /admonition >}}
To preview your notification templates:
@@ -87,13 +87,13 @@ If a matching policy is found, the system continues to evaluate its child polici
By default, once a matching policy is found, the system does not continue to look for sibling policies. If you want sibling policies of one matching policy to handle the alert instance as well, then enable **Continue matching siblings** on the particular matching policy.
{{% admonition type="note" %}}
{{< admonition type="note" >}}
The default notification policy matches all alert instances. It always handles alert instances if there are no child policies or if none of the child policies match the alert instance's labels—this prevents any alerts from being missed.
If alerts use multiple labels, these labels must also be present in a notification policy to match and route notifications to a specific contact point.
{{% /admonition %}}
{{< /admonition >}}
{{< collapse title="Routing example" >}}
@@ -105,9 +105,9 @@ The `team=security` policy is not a match and **Continue matching siblings** was
**Disk Usage – 80%** has both a `team` and `severity` label, and matches a child policy of the operations team.
{{% admonition type="note" %}}
{{< admonition type="note" >}}
When an alert matches both a parent policy and a child policy (like it does in this case), the routing follows the child policy (`severity`) as it provides a more specific match.
{{% /admonition %}}
{{< /admonition >}}
**Unauthorized log entry** has a `team` label but does not match the first policy (`team=operations`) since the values are not the same, so it will continue searching and match the `team=security` policy. It does not have any child policies, so the additional `severity=high` label is ignored.
@@ -89,11 +89,11 @@ If an alert does not contain labels specified either in the grouping of the defa
## View notification errors
{{% admonition type="note" %}}
{{< admonition type="note" >}}
Notification errors are only available with [pre-configured Grafana Alertmanagers](ref:alertmanager).
{{% /admonition %}}
{{< /admonition >}}
Notification errors provide information about why they failed to be sent or were not received.
@@ -24,13 +24,13 @@ An alert event is displayed each time an alert instance changes its state over a
## View from the History page
{{% admonition type="note" %}}
{{< admonition type="note" >}}
For Grafana Enterprise and OSS users:
The feature is available starting with Grafana 11.2.
To try out the new alert history page, enable the `alertingCentralAlertHistory` feature toggle and configure [Loki annotations](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/alerting/set-up/configure-alert-state-history/).
Users can only see the history and transitions of alert rules they have access to (RBAC).
{{% /admonition %}}
{{< /admonition >}}
To access the History view, complete the following steps.
@@ -44,9 +44,9 @@ To access the History view, complete the following steps.
3. Filter by current state and previous state by selecting a state from the drop-down or by clicking the states from the list of events.
Zoom in by dragging on the chart or use the time picker.
{{% admonition type="note" %}}
{{< admonition type="note" >}}
If you exceed the 5000 alerts limit, you may see data missing from the chart. To see complete results, narrow the time frame.
{{% /admonition %}}
{{< /admonition >}}
4. Under the chart, there is a list of events. Each event represents a state change on an alert instance. Expand a row to see the number of transitions for the alert instance, a state graph, and the value in the transition.
5. Click the alert rule name to jump to the History tab in the Alert Rule view.
@@ -59,9 +59,9 @@ Use the State history view to get insight into how your individual alert instanc
View information on when a state change occurred, what the previous state was, the current state, any other alert instances that changed their state at the same time as well as what the query value was that triggered the change.
{{% admonition type="note" %}}
{{< admonition type="note" >}}
Open source users must [configure alert state history](/docs/grafana/latest/alerting/set-up/configure-alert-state-history/) in order to be able to access the view.
{{% /admonition %}}
{{< /admonition >}}
To access the State history view, complete the following steps.
@@ -101,9 +101,9 @@ For provisioning instructions, refer to the [Alertmanager data source documentat
After adding an Alertmanager, you can use the Grafana Alerting UI to manage notification policies, contact points, silences, and other alerting resources from within Grafana.
{{% admonition type="note" %}}
{{< admonition type="note" >}}
When using Prometheus, you can manage silences in the Grafana Alerting UI. However, other Alertmanager resources such as contact points, notification policies, and templates are read-only because the Prometheus Alertmanager HTTP API does not support updates for these resources.
{{% /admonition %}}
{{< /admonition >}}
When using multiple Alertmanagers, use the `Choose Alertmanager` dropdown to switch between Alertmanagers.
@@ -119,9 +119,9 @@ After enabling **Receive Grafana Alerts** in the Data Source Settings, you must
All Grafana-managed alerts are forwarded to Alertmanagers marked as `Receiving Grafana-managed alerts`.
{{% admonition type="note" %}}
{{< admonition type="note" >}}
Grafana Alerting does not support forwarding Grafana-managed alerts to the AlertManager in Amazon Managed Service for Prometheus. For more details, refer to [this GitHub issue](https://github.com/grafana/grafana/issues/64064).
{{% /admonition %}}
{{< /admonition >}}
## Use an Alertmanager as a contact point to receive specific alerts
@@ -155,13 +155,13 @@ For a demo, see this [example using Docker Compose](https://github.com/grafana/a
When running multiple Grafana instances, all alert rules are evaluated on every instance. This multiple evaluation of alert rules is visible in the [state history](ref:state-history) and provides a straightforward way to verify that your high availability configuration is working correctly.
{{% admonition type="note" %}}
{{< admonition type="note" >}}
If using a mix of `execute_alerts=false` and `execute_alerts=true` on the HA nodes, since the alert state is not shared amongst the Grafana instances, the instances with `execute_alerts=false` do not show any alert status.
The HA settings (`ha_peers`, etc.) apply only to communication between alertmanagers, synchronizing silences and attempting to avoid duplicate notifications, as described in the introduction.
{{% /admonition %}}
{{< /admonition >}}
You can also confirm your high availability setup by monitoring Alertmanager metrics exposed by Grafana.
@@ -137,7 +137,7 @@ To export alert rules from the Grafana UI, complete the following steps.
### Modify alert rule and export rule group without saving changes
{{% admonition type="note" %}} This feature is for Grafana-managed alert rules only. It is available to Admin, Viewer, and Editor roles. {{% /admonition %}}
{{< admonition type="note" >}} This feature is for Grafana-managed alert rules only. It is available to Admin, Viewer, and Editor roles. {{< /admonition >}}
Use the **Modify export** mode to edit and export an alert rule without updating it. The exported data includes all alert rules within the same alert group.
@@ -155,7 +155,7 @@ To export a modified alert rule without saving the modifications, complete the f
### Export a new alert rule definition without saving changes
{{% admonition type="note" %}} You can only export in Terraform (HCL) format. {{% /admonition %}}
{{< admonition type="note" >}} You can only export in Terraform (HCL) format. {{< /admonition >}}
Add a new alert rule definition to an existing provisioned rule group rather than creating the code manually. You can then copy it to your Terraform pipeline, and quickly deploy and manage alert rules as part of your infrastructure as code.
@@ -197,7 +197,7 @@ However, you can export it by manually copying the content and name of the notif
All notification policies are provisioned through a single resource: the root of the notification policy tree.
{{% admonition type="warning" %}}
{{< admonition type="warning" >}}
Since the policy tree is a single resource, provisioning it overwrites a policy tree created through any other means.
@@ -702,7 +702,7 @@ Create or reset the notification policy tree using provisioning files in your Gr
In Grafana, the entire notification policy tree is considered a single, large resource. Add new specific policies as sub-policies under the root policy. Since specific policies may depend on each other, you cannot provision subsets of the policy tree; the entire tree must be defined in a single place.
{{% admonition type="warning" %}}
{{< admonition type="warning" >}}
Since the policy tree is a single resource, provisioning it will overwrite a policy tree created through any other means.
@@ -341,7 +341,7 @@ In this section, we'll create Terraform configurations for each alerting resourc
[Notification policies](ref:notification-policy) defines how to route alert instances to your contact points.
{{% admonition type="warning" %}}
{{< admonition type="warning" >}}
Since the policy tree is a single resource, provisioning the `grafana_notification_policy` resource will overwrite a policy tree created through any other means.