Skip to main content
Back to integrations

Alertmanager

Receive alerts from Prometheus Alertmanager

Overview

Alertmanager groups and routes the alerts that Prometheus fires. Add Akmatori as a webhook receiver: each alert in a grouped notification becomes a separate alert in Akmatori. Akmatori reads the alertname, severity, instance and job labels and the summary, description and runbook_url annotations, and uses the alert fingerprint to match a resolved notification to its firing alert.

Setup steps

1

Create an alert source in Akmatori

Open Connectors → Discover → Prometheus Alertmanager (or your existing Alertmanager connector), go to the Alerts tab and choose New Source. Copy the webhook URL.

2

Configure Alertmanager

Add a webhook receiver to alertmanager.yml. If you set a webhook secret on the alert source, send it as a bearer token (as below) or in the X-Alertmanager-Secret header:

yaml
receivers:
  - name: 'akmatori'
    webhook_configs:
      - url: 'https://your-akmatori-url/webhook/alert/<uuid>'
        send_resolved: true
        http_config:
          authorization:
            type: Bearer
            credentials: '<your-webhook-secret>'
3

Update routes

Route alerts to the Akmatori receiver:

yaml
route:
  receiver: 'akmatori'
  group_by: ['alertname', 'severity']
  group_wait: 10s
  group_interval: 10s
  repeat_interval: 1h

Example payload

An example of the payload that Akmatori accepts from Alertmanager:

json
{
  "receiver": "akmatori",
  "status": "firing",
  "alerts": [
    {
      "status": "firing",
      "labels": {
        "alertname": "HighCPUUsage",
        "severity": "critical",
        "instance": "server-01:9090",
        "job": "node"
      },
      "annotations": {
        "summary": "High CPU usage detected",
        "description": "CPU usage is above 90%"
      },
      "startsAt": "2024-01-15T10:30:00Z",
      "fingerprint": "a1b2c3d4e5f60718"
    }
  ]
}
Keep send_resolved: true. When a resolved notification arrives, Akmatori marks the matching alert as resolved, shortens the incident's monitor window when no other alert on it is still firing, and posts a note in the incident's Slack thread if it has one.