Alerting docs: updates alert list view details (#84913)

* Alerting docs: updates alert list view details

* couple fixes

* prettier fixes

* corrects title
pull/84819/head^2
brendamuir 2 years ago committed by GitHub
parent a4ff2abd9d
commit f30f7dfb93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      docs/sources/alerting/alerting-rules/templating-labels-annotations.md
  2. 67
      docs/sources/alerting/manage-notifications/view-alert-rules.md

@ -14,11 +14,11 @@ labels:
- cloud
- enterprise
- oss
title: Templating labels and annotations
title: Template labels and annotations
weight: 500
---
# Templating labels and annotations
# Template labels and annotations
You can use templates to include data from queries and expressions in labels and annotations. For example, you might want to set the severity label for an alert based on the value of the query, or use the instance label from the query in a summary annotation so you know which server is experiencing high CPU usage.

@ -4,7 +4,7 @@ aliases:
- ../../alerting/alerting-rules/view-alert-rules/ # /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/view-alert-rules
- ../../alerting/alerting-rules/rule-list/ # /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/rule-list
canonical: https://grafana.com/docs/grafana/latest/alerting/manage-notifications/view-alert-rules/
description: View and filter by alert rules
description: View alert rules
keywords:
- grafana
- alerting
@ -16,66 +16,61 @@ labels:
- cloud
- enterprise
- oss
title: View and filter alert rules
title: View alert rules
weight: 410
---
# View and filter alert rules
# View alert rules
The Alerting page lists all existing alert rules. By default, rules are grouped by types of data sources. The Grafana section lists all Grafana managed rules. Alert rules for Prometheus compatible data sources are also listed here. You can view alert rules for Prometheus compatible data sources but you cannot edit them.
The Mimir/Cortex/Loki rules section lists all rules for Mimir, Cortex, or Loki data sources. Cloud alert rules are also listed in this section.
The Alert rules list view page lists all existing alert rules. By default, alert rules are grouped by alert rule type: Grafana-managed (Grafana) or data source-managed (Mimir/Cortex/Loki). The Grafana section also contains alert rules for Prometheus-compatible data sources. You can view alert rules for Prometheus compatible data sources, but you cannot edit them.
When managing large volumes of alerts, you can use extended alert rule search capabilities to filter on folders, evaluation groups, and rules. Additionally, you can filter alert rules by their properties like labels, state, type, and health.
- [View and filter alert rules](#view-and-filter-alert-rules)
- [View alert rules](#view-alert-rules)
- [Export alert rules](#export-alert-rules)
- [View query definitions for provisioned alerts](#view-query-definitions-for-provisioned-alerts)
- [Grouped view](#grouped-view)
- [State view](#state-view)
- [Filter alert rules](#filter-alert-rules)
From the Alert rule list page, you can also duplicate alert rules to help you reuse existing alert rules.
## View alert rules
To view alerting details:
To view your alert rules, complete the following steps.
1. Click **Alerts & IRM** -> **Alert rules**.
1. In **View as**, toggle between Grouped, List, or State views.
1. Expand each alert rule row to view the state, health, evaluation details, as well as a list of alert instances resulting from the alert rule.
1. Use **Search by data sources** to view alert rules that query the selected data source.
1. Click **Alerts & IRM** -> **Alert rules**. By default, the List view displays.
1. In **View as**, toggle between Grouped, List, or State views by clicking the relevant option. See [Grouped view](#grouped-view) and [State view](#state-view) for more information.
1. Expand the rule row to view the rule labels, annotations, data sources the rule queries, and a list of alert instances resulting from this rule.
### Grouped view
{{< figure src="/static/img/docs/alerting/unified/rule-details-8-0.png" max-width="650px" caption="Alerting rule details" >}}
Grouped view shows Grafana alert rules grouped by folder and Loki or Prometheus alert rules grouped by `namespace` + `group`. This is the default rule list view, intended for managing alert rules. You can expand each group to view a list of rules in this group.
From the Alert list page, you can also make copies of alert rules to help you reuse existing alert rules.
### State view
## Export alert rules
State view shows alert rules grouped by state. Use this view to get an overview of which rules are in which state. You can expand each group to view more details.
Click the **Export rule group** icon next to each alert rule group to export to YAML, JSON, or Terraform.
## View alert rule details
Click **Export rules** to export all Grafana-managed alert rules to YAML, JSON, or Terraform.
To view alert rule details, complete the following steps.
Click **More** -> **Modify export** next to each individual alert rule within a group to edit provisioned alert rules and export a modified version.
1. Click **Alerts & IRM** -> **Alert rules**.
1. Click to expand an alert rule.
1. In **Actions**, click **View** (the eye icon).
## View query definitions for provisioned alerts
The namespace and group are shown in the breadcrumb navigation. They are interactive and can be used to filter rules by namespace or group.
View read-only query definitions for provisioned alerts. Check quickly if your alert rule queries are correct, without diving into your "as-code" repository for rule definitions.
The rest of the alert detail content is split up into tabs:
### Grouped view
**Query and conditions**
Grouped view shows Grafana alert rules grouped by folder and Loki or Prometheus alert rules grouped by `namespace` + `group`. This is the default rule list view, intended for managing rules. You can expand each group to view a list of rules in this group. Expand a rule further to view its details. You can also expand action buttons and alerts resulting from the rule to view their details.
View the details of the query that is used for the alert rule, including the expressions and intermediate values for each step of the expression pipeline. A graph view is included for range queries and data sources that return time series-like data frames.
{{< figure src="/static/img/docs/alerting/unified/rule-list-group-view-8-0.png" max-width="800px" caption="Alerting grouped view" >}}
**Instances**
### State view
Explore each alert instance, its status, labels and various other metadata for multi-dimensional alert rules.
State view shows alert rules grouped by state. Use this view to get an overview of which rules are in what state. Each rule can be expanded to view its details. Action buttons and any alerts generated by this rule, and each alert can be further expanded to view its details.
Use **Search by label** to enter search criteria using label selectors. For example, `environment=production,region=~US|EU,severity!=warning`.
{{< figure src="/static/img/docs/alerting/unified/rule-list-state-view-8-0.png" max-width="800px" caption="Alerting state view" >}}
**History**
## Filter alert rules
Explore the recorded history for an alert rule. You can also filter by alert state.
To filter alert rules:
**Details**
- From **Select data sources**, select a data source. You can see alert rules that query the selected data source.
- In the **Search by label**, enter search criteria using label selectors. For example, `environment=production,region=~US|EU,severity!=warning`.
- From **Filter alerts by state**, select an alerting state you want to see. You can see alerting rules that match the state. Rules matching other states are hidden.
Debug or audit using the alert rule metadata and view the alert rule annotations.

Loading…
Cancel
Save