Skip to main content
Back to integrations

PagerDuty

Receive PagerDuty webhooks; the agent can look up incidents and on-call

Overview

PagerDuty sends incident events to Akmatori through a v3 webhook subscription. Akmatori uses the incident title as the alert name, the service name as the service, and the source as the host. Severity comes from the priority (P1 or "critical" is critical, P2 or "high" is high), then from urgency. The PagerDuty connector can also hold API access, so the agent can look up incidents and on-call during an investigation.

Setup steps

1

Create an alert source in Akmatori

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

2

Create a PagerDuty webhook

In PagerDuty, go to Integrations → Generic Webhooks (v3) and add a webhook subscription with the Akmatori webhook URL.

3

Select events

Select incident.triggered, incident.reopened and incident.resolved. Do not select incident.acknowledged: Akmatori v0.4.0 and earlier treat it as resolved, and later versions ignore it. Later versions also ignore all other event types.

Example payload

An example of the payload that Akmatori accepts from PagerDuty:

json
{
  "event": {
    "id": "event-abc123",
    "event_type": "incident.triggered",
    "data": {
      "id": "incident-xyz789",
      "type": "incident",
      "title": "Database connection timeout",
      "description": "Database connection timeout threshold exceeded.",
      "status": "triggered",
      "urgency": "high",
      "priority": {
        "id": "priority-001",
        "summary": "P1 - Critical"
      },
      "service": {
        "id": "service-db-001",
        "name": "Database Service",
        "summary": "Primary database"
      },
      "source": "db-primary.example.com",
      "body": {
        "type": "incident.body",
        "details": {
          "runbook": "https://runbooks.example.com/db-pool"
        }
      }
    }
  }
}
To protect the webhook, set a webhook secret on the Akmatori alert source and add the custom header Authorization: Bearer <secret> to the PagerDuty subscription. In versions after v0.4.0 you can instead set the subscription's signing secret as the webhook secret: Akmatori then checks the HMAC-SHA256 signature in X-PagerDuty-Signature on every request.