Grafana: List Alert Rules
grafana_list_alert_rulesLists alert and recording rules with their state, health, labels, and group across Grafana-managed and Prometheus/Loki sources; filter by source, group, state, or failed evaluations.
Instructions
The alert rules and their evaluation state, from Grafana-managed alerting and from every Prometheus/Loki datasource that evaluates its own rules. Firing first, then pending. Each rule has its group, state, health (and lastError when it fails to evaluate), its for and labels; include_query adds the expression. Recording rules are left out unless type=record or all. Use grafana_list_alerts for the alert instances themselves.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | alert (default), record (recording rules), or all. | alert |
| group | No | Only this rule group (or folder), substring, e.g. "kubernetes-apps". | |
| limit | No | Maximum rules (1-2000). Defaults to 100. | |
| state | No | Only rules in this state. Defaults to any. | any |
| search | No | Case-insensitive substring to filter by, e.g. `nginx`. | |
| source | No | Only this source: "grafana" for Grafana-managed alerting, or a Prometheus/Loki datasource uid or name. Defaults to every source. | |
| unhealthy | No | Only rules whose evaluation fails (health err / nodata). | |
| include_query | No | Add each rule's expression. Off by default: it is most of the size. |