---
title: "Alertmanager data source | Grafana documentation"
description: "Use the Alertmanager data source to manage silences, contact points, and notification policies in the Grafana Alerting UI."
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

# Alertmanager data source

Grafana includes built-in support for Alertmanager implementations in Prometheus and Grafana Mimir. After you add an Alertmanager data source, you can use the **Choose Alertmanager** drop-down in [Grafana Alerting](/docs/grafana-cloud/alerting-and-irm/alerting/) to view and manage Alertmanager resources such as silences, contact points, and notification policies. You can also enable the Alertmanager to receive Grafana-managed alerts.

## Alertmanager implementations

The data source supports the following Alertmanager implementations. You can specify the implementation on the data source’s **Settings** page.

Expand table

| Implementation      | Silences   | Contact points | Notification policies | Templates  |
|---------------------|------------|----------------|-----------------------|------------|
| **Mimir** (default) | Read/write | Read/write     | Read/write            | Read/write |
| **Cortex**          | Read/write | Read/write     | Read/write            | Read/write |
| **Prometheus**      | Read/write | Read-only      | Read-only             | Read-only  |

When using the Prometheus implementation, you can manage silences in the Grafana Alerting UI. Contact points, notification policies, and templates are read-only because the Prometheus Alertmanager API does not support write operations for these resources.

## Configure the data source

To add and configure the Alertmanager data source, complete the following steps:

1. Click **Connections** in the left-side menu.
2. Under Your connections, click **Data sources**.
3. Enter `Alertmanager` in the search bar.
4. Click **Alertmanager**.
   
   The **Settings** tab of the data source is displayed.
5. Set the data source’s basic configuration options:
   
   Expand table
   
   | Name                            | Description                                                                                                                                                                                 |
   |---------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
   | **Name**                        | Sets the name you use to refer to the data source                                                                                                                                           |
   | **Default**                     | Sets whether the data source is pre-selected for new panels and queries                                                                                                                     |
   | **Alertmanager Implementation** | Alertmanager implementation. **Mimir**, **Cortex,** and **Prometheus** are supported                                                                                                        |
   | **Receive Grafana Alerts**      | When enabled, the Alertmanager can receive Grafana-managed alerts. **Important:** This works only if receiving alerts is enabled for the Alertmanager in the Grafana Alerting Settings page |
   | **HTTP URL**                    | Sets the HTTP protocol, IP, and port of your Alertmanager instance, such as `https://alertmanager.example.org:9093`                                                                         |
   | **Access**                      | Only **Server** access mode is functional                                                                                                                                                   |

### Authentication

The data source supports all standard Grafana HTTP authentication methods, including basic auth and TLS. When SigV4 authentication is enabled globally in Grafana, it’s also available for this data source.

For more information about authentication options and connection settings, refer to [Data source management](/docs/grafana/next/administration/data-source-management/).

### Verify the connection

Click **Save &amp; test** to verify the connection. A successful connection returns `Health check passed.`

> Note
> 
> If you’re using the Mimir implementation and Mimir Alertmanager hasn’t been configured yet, the health check may still pass. This is expected behavior when Mimir is running in lazy configuration mode.

## Provision the data source

You can provision Alertmanager data sources using configuration files or Terraform.

The `jsonData` fields used across both methods are:

Expand table

| Field                        | Description                                                                                                                                                      |
|------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `implementation`             | The Alertmanager implementation. Supported values: `mimir`, `cortex`, `prometheus`. Defaults to `mimir`.                                                         |
| `handleGrafanaManagedAlerts` | When `true`, this Alertmanager receives Grafana-managed alerts. You must also enable alert forwarding in **Alerting** &gt; **Administration** in the Grafana UI. |

### Configuration file

For more information, refer to [Provisioning data sources](/docs/grafana/next/administration/provisioning/#data-sources).

YAML ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```yaml
apiVersion: 1

datasources:
  - name: Alertmanager
    type: alertmanager
    url: http://localhost:9093
    access: proxy
    jsonData:
      implementation: prometheus
      handleGrafanaManagedAlerts: false
    basicAuth: true
    basicAuthUser: <USERNAME>
    secureJsonData:
      basicAuthPassword: <PASSWORD>
```

### Terraform

To provision the data source with Terraform, use the [`grafana_data_source` resource](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/data_source):

hcl ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```hcl
resource "grafana_data_source" "alertmanager" {
  name = "Alertmanager"
  type = "alertmanager"
  url  = "http://localhost:9093"

  json_data_encoded = jsonencode({
    implementation            = "prometheus"
    handleGrafanaManagedAlerts = false
  })
}
```

For all available configuration options, refer to the [Grafana provider data source resource documentation](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/data_source).

## Troubleshoot Alertmanager data source issues

This section covers common issues when configuring or using the Alertmanager data source.

### “Health check failed.”

**Symptoms:**

- **Save &amp; test** returns `Health check failed.`
- The Alertmanager URL may be unreachable or returning an unexpected response.

**Possible causes and solutions:**

Expand table

| Cause                         | Solution                                                                                                                                      |
|-------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|
| Incorrect URL                 | Verify the URL points to your Alertmanager instance and includes the correct protocol, host, and port (for example, `http://localhost:9093`). |
| Network or firewall issue     | Verify that the Grafana server can reach the Alertmanager endpoint. Check firewall rules and DNS resolution.                                  |
| Wrong implementation selected | If you changed the implementation type, re-test the connection. See the implementation mismatch errors below.                                 |
| Incorrect credentials         | If basic auth is enabled, verify the username and password are correct.                                                                       |

### “It looks like you have chosen Prometheus implementation, but detected a Mimir or Cortex endpoint.”

**Symptoms:**

- **Save &amp; test** fails with this message when **Alertmanager Implementation** is set to **Prometheus**.

**Solution:**

The URL you entered is a Mimir or Cortex Alertmanager endpoint, not a Prometheus one. Change **Alertmanager Implementation** to **Mimir** or **Cortex** and click **Save &amp; test** again.

### “It looks like you have chosen a Mimir or Cortex implementation, but detected a Prometheus endpoint.”

**Symptoms:**

- **Save &amp; test** fails with this message when **Alertmanager Implementation** is set to **Mimir** or **Cortex**.

**Solution:**

The URL you entered is a Prometheus Alertmanager endpoint. Change **Alertmanager Implementation** to **Prometheus** and click **Save &amp; test** again.

### Grafana-managed alerts are not being received

**Symptoms:**

- Grafana-managed alert instances don’t appear in this Alertmanager.
- The **Receive Grafana Alerts** toggle is enabled in the data source settings, but no alerts arrive.

**Solution:**

Enabling **Receive Grafana Alerts** on the data source alone isn’t enough. You must also enable alert forwarding in **Alerting** &gt; **Administration** in the Grafana UI. Both settings must be on for Grafana-managed alerts to be forwarded to this Alertmanager.

### Contact points and notification policies are read-only

**Symptoms:**

- You can view but not edit contact points, notification policies, or templates in the Grafana Alerting UI.

**Cause:**

You’re using the **Prometheus** implementation. The Prometheus Alertmanager API doesn’t support write operations for these resources.

**Solution:**

If you need full read/write access to contact points and notification policies, switch to a **Mimir** or **Cortex** Alertmanager and update the **Alertmanager Implementation** setting.

## Related resources

- [Grafana Alerting](/docs/grafana-cloud/alerting-and-irm/alerting/)
- [Configure external Alertmanagers](/docs/grafana-cloud/alerting-and-irm/alerting/set-up/configure-alertmanager/)
- [Prometheus Alertmanager documentation](https://prometheus.io/docs/alerting/latest/alertmanager/)
- [Grafana Mimir documentation](/docs/mimir/latest/)
- [Grafana community forums](https://community.grafana.com/)
