Skip to main content
Back to integrations

Datadog

Receive alerts from Datadog monitors

Overview

Datadog monitors send alerts to Akmatori through the Datadog Webhooks integration. You define the JSON payload in Datadog, so it must use the field names that the Akmatori adapter reads (see the example below).

Setup steps

1

Create an alert source in Akmatori

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

2

Create a webhook in Datadog

In Datadog, go to Integrations → Webhooks and create a webhook named akmatori with your Akmatori URL. Set a custom JSON payload with the fields from the example below. Send tags as a JSON array of strings, and date and last_updated as numbers, not quoted strings: Akmatori rejects the payload if these types are wrong. If you set a webhook secret in Akmatori, send it as a custom header: X-Datadog-Signature, DD-API-KEY or Authorization: Bearer <secret>.

3

Configure monitors

Add @webhook-akmatori to the notification message of each monitor that should send alerts to Akmatori.

Example payload

An example of the payload that Akmatori accepts from Datadog:

json
{
  "id": "event-dd-123",
  "title": "CPU usage is high",
  "body": "CPU usage on host web-01 is above 95%",
  "alert_type": "error",
  "event_type": "monitor.alert",
  "priority": "normal",
  "alert_id": "alert-dd-456",
  "alert_title": "High CPU usage detected",
  "alert_status": "Triggered",
  "hostname": "web-01",
  "date": 1705315800,
  "tags": ["service:web", "env:production", "host:web-01"],
  "event_links": [
    {
      "url": "https://runbooks.example.com/cpu",
      "name": "Runbook"
    }
  ],
  "alert_cycle_key": "cycle-abc123",
  "alert_metric": "system.cpu.user",
  "alert_query": "avg(last_5m):avg:system.cpu.user{host:web-01} > 95"
}
Akmatori takes the host from hostname (or the host tag), the service from the service tag and the severity from alert_type (error is critical). An alert_status that contains "Recovered", "Resolved" or "OK" resolves the alert; any other value fires it. The runbook URL is the event_links entry whose name contains "runbook", or else the first link.