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

# Prometheus Alertmanager

> Connect Alertmanager to aciona.me with a webhook receiver and send_resolved.

## Overview

Alertmanager sends alerts through a **webhook receiver**. Each item in `alerts[]` becomes an alert in aciona.me, and Alertmanager's native `resolved` state resolves the incident automatically.

|                     |                                   |
| ------------------- | --------------------------------- |
| **Source type**     | `Prometheus`                      |
| **Mechanism**       | `webhook_configs` in the receiver |
| **Correlation**     | Alertmanager `fingerprint`        |
| **Auto-resolution** | ✅                                 |

## Prerequisites

* A reachable Alertmanager and permission to edit its configuration.
* A service created in aciona.me and linked to a team with an active schedule.

## 1. Create the alert source in aciona.me

Under **Alert sources**, create a source of type **Prometheus**.

## 2. Copy the URL and the token

```bash theme={null}
POST https://ingress.aciona.me/webhooks/<alertSourceId>
X-Aciona-Token: <sourceToken>
```

## 3. Configure the receiver in Alertmanager

```yaml alertmanager.yml theme={null}
receivers:
  - name: aciona-me
    webhook_configs:
      - url: https://ingress.aciona.me/webhooks/<alertSourceId>
        send_resolved: true
        http_config:
          http_headers:
            X-Aciona-Token:
              value: '<sourceToken>'

route:
  receiver: aciona-me
  group_by: ['alertname', 'service']
  group_wait: 10s
  group_interval: 5m
  repeat_interval: 4h
```

<Warning>
  **`send_resolved: true` is required for auto-resolution.** Without it, Alertmanager only sends `firing` items and incidents stay open until someone resolves them by hand.
</Warning>

Reload the Alertmanager configuration after saving.

## 4. Send a test alert

Post a test alert to your Alertmanager's `/api/v2/alerts` endpoint with labels `alertname`, `severity` and `service`, then check that it reaches aciona.me.

## 5. Confirm the incident

The incident should appear under **Incidents** with the title taken from the `alertname` label.

## 6. How fields are translated

| Field in aciona.me | Origin in Alertmanager                    |
| ------------------ | ----------------------------------------- |
| State              | `alerts[].status` (`firing` / `resolved`) |
| Correlation        | `alerts[].fingerprint`                    |
| Severity           | `severity` label (default: `warning`)     |
| Title              | `alertname` label                         |
| Description        | `description` annotation, then `summary`  |
| Service            | labels `service` → `job` → `instance`     |
| External link      | `alerts[].generatorURL`                   |

<Note>
  aciona.me uses the `status` of **each item** in `alerts[]`, never the group status. That prevents a partially resolved group from closing incidents that are still firing.
</Note>

## Compatibility

The same payload format is used by Thanos Ruler, VictoriaMetrics Alertmanager and Grafana Mimir — the integration should work with those tools unchanged.

## Troubleshooting

<AccordionGroup>
  <Accordion title="The incident opens but never closes" icon="triangle-alert">
    `send_resolved: true` is missing from the receiver. Add it and reload the configuration.
  </Accordion>

  <Accordion title="401 response" icon="lock">
    The `X-Aciona-Token` header is not arriving. Check the indentation of the `http_headers` block and your Alertmanager version — older versions use different syntax for custom headers.
  </Accordion>

  <Accordion title="Severity always warning" icon="gauge">
    The rules have no `severity` label, or use values that are not recognized. See [Severities](/en/reference/severities).
  </Accordion>

  <Accordion title="Wrong service" icon="server">
    Add a `service` label to the rules with the exact service name in aciona.me.
  </Accordion>
</AccordionGroup>
