View and filter alert rules - Amazon Managed Grafana

View and filter alert rules

This documentation topic is designed for Grafana workspaces that support Grafana version 10.x.

For Grafana workspaces that support Grafana version 9.x, see Working in Grafana version 9.

For Grafana workspaces that support Grafana version 8.x, see Working in Grafana version 8.

The Alerting page lists alerting rules. By default, rules are grouped by types of data sources. The Grafana section lists rules managed by Grafana. Alert rules for Prometheus compatible data sources are also listed here. You can view alerting 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.

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 alert rules

Using Grafana alerts, you can view all of your alerts in one page.

To view alerting details
  1. From your Grafana console, in the Grafana menu, choose Alerting, Alert rules. By default, the list view is displayed.

  2. In View as, you can toggle between the Grouped, List, and State views by choosing the option you prefer.

  3. Expand the rule row to view the rule labels, annotations, data sources, the rule queries, and a list of alert instances resulting from the rule.

From this page, you can also make copies of an alert rule to help you reuse existing rules.

Export alert rules

You can export rules to YAML or JSON in the Grafana workspace.

  • Choose the Export rule group icon next to each alert rule group to export to YAML, JSON, or Terraform.

  • Choose Export rules to export all Grafana managed alert rules to YAML, JSON, or Terraform.

  • Choose More, Modify export next to each individual alert rule within a group to edit provisioned alert rules and export a modified version.

View query definitions for provisioned alerts

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.

Grouped view

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.

State view

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.

Filtering alert rules

You can filter the alerting rules that appear on the Alerting page in several ways.

To filter alert rules
  1. From Select data sources, select a data source.. You can see alert rules that query the selected data source.

  2. In Search by label, enter search criteria using label selectors. For example, environment=production;region=~US|EU,severity!=warning.

  3. From Filter alerts by state, select an alerting state you want to see. You can see alerting rules that match that state. Rules matching other states are hidden.