* Clarify DS managed rules support only the creation of Mimir and Loki rules
* additional copy changes
* Extend `Manage alerts via Alerting UI` description
* fix capital letter
* further details for `Manage alerts via Alerting UI`
Data source-managed alert rules can only query Prometheus-based data sources, such as Prometheus, Grafana Mimir, or Grafana Loki. They are one of the two [alert rule types](ref:alert-rules) supported in Grafana.
Data source-managed alert rules can only be created using Grafana Mimir or Grafana Loki data sources.
Data source-managed alert rules are stored within the data source. In a distributed architecture, they can scale horizontally to provide high-availability.
The rules are stored within the data source. In a distributed architecture, they can scale horizontally to provide high-availability. For more details, refer to [alert rule types](ref:alert-rules).
We recommend using [Grafana-managed alert rules](ref:configure-grafana-managed-rules) whenever possible and opting for data source-managed alert rules when scaling your alerting setup is necessary.
We recommend using [Grafana-managed alert rules](ref:configure-grafana-managed-rules) whenever possible and opting for data source-managed alert rules when scaling your alerting setup is necessary.
To create or edit data source-managed alert rules, follow these instructions.
To create or edit data source-managed alert rules, follow these instructions.
## Before you begin
## Before you begin
Verify that you have write permission to the Prometheus, Mimir, or Loki data source. Otherwise, you cannot create or update data source-managed alert rules.
Verify that you have write permission to the Mimir or Loki data source. Otherwise, you cannot create or update data source-managed alert rules.
### Enable the Ruler API
### Enable the Ruler API
@ -96,7 +103,7 @@ For more information, refer to the [Mimir Ruler API](/docs/mimir/latest/referenc
### Permissions
### Permissions
Alert rules for Prometheus, Mimir, or Loki instances can be edited or deleted by users with **Editor** or **Admin** roles.
Alert rules for Mimir or Loki instances can be edited or deleted by users with **Editor** or **Admin** roles.
If you do not want to manage alert rules for a particular data source, go to its settings and clear the **Manage alerts via Alerting UI** checkbox.
If you do not want to manage alert rules for a particular data source, go to its settings and clear the **Manage alerts via Alerting UI** checkbox.
@ -72,8 +77,9 @@ Grafana-managed alert rules are the most flexible alert rule type. They allow yo
{{<figuresrc="/media/docs/alerting/grafana-managed-alerting-architecture.png"max-width="750px"caption="How Grafana-managed alerting works by default">}}
{{<figuresrc="/media/docs/alerting/grafana-managed-alerting-architecture.png"max-width="750px"caption="How Grafana-managed alerting works by default">}}
1. Alert rules are created within Grafana and query one or more data sources.
1. Alert rules are created and stored within Grafana.
1. Alert rules are evaluated by the Alert Rule Evaluation Engine from within Grafana.
1. Alert rules can query one or more supported data sources.
1. Alert rules are evaluated by the Alert Rule Evaluation Engine within Grafana.
1. Firing and resolved alert instances are forwarded to [handle their notifications](ref:notifications).
1. Firing and resolved alert instances are forwarded to [handle their notifications](ref:notifications).
### Supported data sources
### Supported data sources
@ -84,17 +90,17 @@ Find the public data sources supporting Alerting in the [Grafana Plugins directo
## Data source-managed alert rules
## Data source-managed alert rules
Data source-managed alert rules can only query Prometheus-based data sources, such as Prometheus, Grafana Mimir, or Grafana Loki.
Data source-managed alert rules can only be created using Grafana Mimir or Grafana Loki data sources. Both data source backends can provide high availability and fault tolerance, enabling you to scale your alerting setup.
Alert rules are stored within the data source. In this distributed architecture, the separation of components can provide high-availability and fault tolerance, enabling the scaling of your alerting setup.
We recommend using Grafana-managed alert rules whenever possible, and opting for data source-managed alert rules when you need to scale your alerting setup.
We recommend using Grafana-managed alert rules whenever possible, and opting for data source-managed alert rules when you need to scale your alerting setup.
@ -103,7 +109,7 @@ The table below compares Grafana-managed and data source-managed alert rules.
@ -115,7 +120,7 @@ Following are additional configuration options.
### Alerting
### Alerting
- **Manage alerts via Alerting UI** - Toggle to enable `Alertmanager` integration for this data source.
- **Manage alerts via Alerting UI** - Toggle to enable [data source-managed rules in Grafana Alerting](ref:alerting-alert-rules) for this data source. For `Mimir`, it enables managing data source-managed rules and alerts. For `Prometheus`, it only supports viewing existing rules and alerts, which are displayed as data source-managed.
title: 'Note Prometheus data source-managed rules'
---
> Rules from a Prometheus data source appear in the **Data source-managed** section of the **Alert rules** page when [Manage alerts via Alerting UI](ref:shared-configure-prometheus-data-source-alerting) is enabled.
>
> However, Grafana can only create and edit data source-managed rules for Mimir and Loki, not for a Prometheus instance.