Menu
Grafana Cloud Enterprise Open source RSS

Alertmanager data source

Grafana includes built-in support for Alertmanager implementations in Prometheus and Mimir.

Once you add an Alertmanager as a data source, you can use the Choose Alertmanager drop-down on Grafana Alerting to view and manage Alertmanager resources, such as silences, contact points, and notification policies. Additionally, you can enable the Alertmanager to receive Grafana-managed alerts.

For more details about using other Alertmanagers, refer to Alertmanagers in the Grafana Alerting documentation.

Alertmanager implementations

The data source supports Prometheus and Grafana Mimir (default) implementations of Alertmanager. You can specify the implementation in the data source’s Settings page.

When using Prometheus, you can manage silences in the Grafana Alerting UI. However, other Alertmanager resources such as contact points, notification policies, and templates are read-only because the Prometheus Alertmanager HTTP API does not support updates for these resources.

Configure the data source

To configure basic settings for the 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:

    NameDescription
    NameSets the name you use to refer to the data source
    DefaultSets whether the data source is pre-selected for new panels and queries
    Alertmanager ImplementationAlertmanager implementation. Mimir, Cortex, and Prometheus are supported
    Receive Grafana AlertsWhen 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 URLSets the HTTP protocol, IP, and port of your Alertmanager instance, such as https://alertmanager.example.org:9093
    AccessOnly Server access mode is functional

Provision the Alertmanager data source

You can provision Alertmanager data sources by updating Grafana’s configuration files. For more information on provisioning, and common settings available, refer to the provisioning docs page.

Here is an example for provisioning the Alertmanager data source:

yaml
apiVersion: 1

datasources:
  - name: Alertmanager
    type: alertmanager
    url: http://localhost:9093
    access: proxy
    jsonData:
      # Valid options for implementation include mimir, cortex and prometheus
      implementation: prometheus
      # Whether or not Grafana should send alert instances to this Alertmanager
      handleGrafanaManagedAlerts: false
    # optionally
    basicAuth: true
    basicAuthUser: my_user
    secureJsonData:
      basicAuthPassword: test_password