> ## Documentation Index
> Fetch the complete documentation index at: https://docs.incident.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Adding Prometheus Alertmanager as an alert source

> Send Prometheus Alertmanager notifications into incident.io to page the right people and open incidents.

Prometheus Alertmanager groups and routes the alerts your Prometheus rules fire. Connect it to
incident.io and every Alertmanager notification becomes an incident.io alert, so you can route
it to a team, escalate to whoever is on call, and open an incident when one matters.

| | |
| - | - |
| **Plans** | All plans |
| **Connects with** | An alert source. Alertmanager sends notifications to incident.io through a receiver in `alertmanager.yml` |
| **What you get** | [Alerts](https://docs.incident.io/alerts/getting-started.md) and [alert attributes](https://docs.incident.io/alerts/attributes-and-priorities.md) to route, escalate and declare incidents from |

## Step 1: create the alert source

1. Go to [Alerts](https://app.incident.io/~/on-call/alert-routes/sources) in your incident.io dashboard
   and select the **Sources** tab.
2. Press **Create source**, search for **Prometheus Alertmanager**, and continue.
3. Give it a name.

The setup page shows an `alertmanager.yml` snippet with your source's URL and token already
filled in, and a **Grouped alert notifications** setting. Keep it open for the next step.

## Step 2: connect Alertmanager

Add an incident.io receiver to your `alertmanager.yml`, copying the snippet from the setup page
tab that matches your Alertmanager version.

**Native notifier (Alertmanager 0.29 and later):**

```yaml alertmanager.yml theme={null}
route:
  group_by: ['alertname']
  repeat_interval: 3h
  receiver: 'incidentio'
receivers:
  - name: 'incidentio'
    incidentio_configs:
      - url: '<URL from the setup page>'
        alert_source_token: '<token from the setup page>'
```

**Webhook (any version).** Keep `send_resolved: true`, or alerts won't resolve in incident.io:

```yaml alertmanager.yml theme={null}
route:
  group_by: ['alertname']
  repeat_interval: 3h
  receiver: 'webhook'
receivers:
  - name: 'webhook'
    webhook_configs:
      - url: '<URL from the setup page>'
        send_resolved: true
        http_config:
          authorization:
            credentials: '<token from the setup page>'
```

Reload Alertmanager to pick up the change. If you already have a route tree, add the receiver
to the routes you want to page on rather than replacing it.

Refer to the
[Alertmanager configuration documentation](https://prometheus.io/docs/alerting/latest/configuration/)
for the rest of the routing options.

### Choose how to handle grouped notifications

Alertmanager
[groups alerts](https://prometheus.io/docs/alerting/latest/alertmanager/#grouping) by your
route's `group_by` labels. The **Grouped alert notifications** setting on the setup page decides
what incident.io does with each group:

* **Apply Alertmanager's grouping** (recommended, and the default): one incident.io alert per
  group.
* **Ignore Alertmanager's grouping**: one incident.io alert per individual alert.

## How alerts behave

* **Title and description.** The alert title is the `alertname` label, and the description
  shows the annotations and labels. The alert links to the Prometheus `generatorURL`, or to a
  dashboard annotation when there isn't one.
* **Deduplication.** With grouping applied, notifications for the same group update one alert.
  With it ignored, each alert is matched by its label fingerprint. See
  [why Alertmanager alerts might not appear](https://docs.incident.io/alerts/prometheus-issues.md).
* **Resolution.** A `resolved` notification resolves the alert. A group stays firing while any
  alert in it is still firing.
* **Attributes.** Group labels and common labels are the best place to find a team or service.
  Use these to set [alert attributes](https://docs.incident.io/alerts/attributes-and-priorities.md), for example to map a
  `team` label to a team.

## Step 3: check it works

Fire a test alert through Alertmanager, or wait for a Prometheus rule to fire. The alert should
appear on the alert source page in incident.io within a few seconds.

If nothing arrives, check **Recent requests** on that page. Every request Alertmanager sent is
listed there, including any that were rejected, with the reason.

***

Can't find the alert source you are looking for? Head to our
[integrations page](https://incident.io/integrations) or message us at
[support@incident.io](mailto:support@incident.io).
