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

# Datadog

> Send Datadog monitor alerts to Corelayer for investigation.

Configure a Datadog webhook to send monitor notifications to Corelayer. The preset uses the monitor's name, query, scope, and state transition to describe the alert.

To give investigations access to Datadog logs and metrics, also connect the [Datadog integration](/integrations/datadog).

## Prerequisites

You need permission to add webhooks in Corelayer, configure Datadog's Webhooks integration, and edit the monitors you want to connect.

## Setup

### 1. Create a source

In Corelayer, open **Webhooks** and click **Add Webhook**. Set **Webhook type** to **Datadog monitors**, enter a **Source name**, and click **Create Webhook**.

Copy the **Webhook URL**, **Webhook token**, and payload template. The token is shown once, so store it before clicking **Done**.

### 2. Configure Datadog

Open Datadog's **Webhooks** integration tile. Add a webhook named `corelayer` and set its URL to the Corelayer webhook URL.

Create a custom variable named `CORELAYER_WEBHOOK_TOKEN` with the Corelayer token as its value, and select **hide from view**. In the webhook's custom headers, enter:

```json theme={null}
{
  "Authorization": "Bearer $CORELAYER_WEBHOOK_TOKEN",
  "Content-Type": "application/json"
}
```

Datadog supports [custom variables in headers](https://docs.datadoghq.com/integrations/webhooks/#custom-variables), so you can update the token without editing the header format.

Set **Payload** to this template and leave **Encode as form** unchecked:

```json theme={null}
{
  "id": "$ALERT_ID",
  "title": "$ALERT_TITLE",
  "metric": "$ALERT_METRIC",
  "query": "$ALERT_QUERY",
  "scope": "$ALERT_SCOPE",
  "transition": "$ALERT_TRANSITION",
  "date": "$DATE_POSIX",
  "url": "$LINK"
}
```

Keep the variable names in the template; Datadog fills them when it sends a notification. `$DATE_POSIX` supplies the event time in seconds. Save the webhook.

### 3. Add it to a monitor

Edit the monitor's notification message and add `@webhook-corelayer`. If you chose a different webhook name, use `@webhook-<name>`. Save the monitor. Datadog's [webhook setup guide](https://docs.datadoghq.com/integrations/webhooks/#usage) explains the notification syntax.

When the monitor sends a **Triggered** or **Re-Triggered** notification, look for the resulting investigation in Corelayer.

## How alerts are handled

`Triggered` and `Re-Triggered` start investigations. `Recovered` records a resolution without closing the Corelayer issue. Other transitions, including `Warn`, `No Data`, and `Renotify`, are recorded without investigation.

Repeated notifications may be suppressed as duplicates. An accepted webhook request does not mean an investigation has finished.

See [Manage sources](/webhooks/overview#manage-sources) to change or remove this source.

## Troubleshooting

* **No notification arrives:** Check that the monitor includes the correct `@webhook-<name>` mention and that the monitor was saved.
* **`401` response:** Check the custom variable's value and the `Authorization` header. The value after `Bearer` must be the Corelayer webhook token.
* **Missing alert details:** Use the full payload template above and the **Datadog monitors** source type. Datadog's default payload has a different shape.
* **No investigation starts:** Check `transition` in the payload. Recovery, warning, no-data, and renotify notifications do not start investigations.

Need help? [Contact support](mailto:support@corelayer.com).


## Related topics

- [Datadog Integration: Add an AI SRE Layer](/integrations/datadog.md)
- [Custom alerts](/webhooks/custom.md)
- [Corelayer Changelog: April 2026 Release](/changelog/april-2026.md)
