# Integrate Spike with Datadog

<figure><img src="/files/NUVF7ZjNXbqtYsOLiImh" alt="Datadog integration with Spike"><figcaption></figcaption></figure>

## Service and Integration Setup

Before proceeding, ensure you have:

1. Added the **Datadog integration** in Spike.
2. Copied the **Spike webhook URL** from the dashboard.

For details, see:

{% content-ref url="/pages/-Ln3rb4wLUFeI-OAPcmq" %}
[Create integration and service on our dashboard](/integrations-guideline/create-integration-and-service-on-dashboard.md)
{% endcontent-ref %}

***

## Configure the Webhook in Datadog

### Step 1: Open Integrations

From the **sidebar**, select **Integrations**.

![Select Integration](/files/-MB4IvbX7XRDKVUH5a37)

***

### Step 2: Choose Webhooks

Search for **Webhooks** in the integrations list and select it.

![Select Webhook](/files/S78XcvnSf7miu1WKXOWX)

***

### Step 3: Create a Webhook

Fill in the details and paste your **Spike webhook URL** into the **URL field**.

![Datadog Webhook](/files/2s4Y5OJKB5fWKIV1RJjD)

***

### Step 4: Add the Payload

Copy the following payload and paste it into Datadog. You can also customize it with any of Datadog’s template variables.

{% hint style="warning" %}
To ensure proper incident management:

1. Include **`$AGGREG_KEY`** – enables automatic resolution.
2. Include **`$ALERT_TRANSITION`** – indicates if the event is triggering or resolving.
   {% endhint %}

```json
{ 
  "body": "$EVENT_MSG",
  "last_updated": "$LAST_UPDATED",
  "event_type": "$EVENT_TYPE",
  "title": "$EVENT_TITLE",
  "date": "$DATE",
  "alert_transition": "$ALERT_TRANSITION",
  "aggreg_key": "$AGGREG_KEY", 
  "org": {
    "id": "$ORG_ID",
    "name": "$ORG_NAME"
  },
  "id": "$ID" 
}
```

***

## Set Up Automatic Notifications

1. Go to **Incident Settings** in Datadog.
2. Click **Notification Rules** → **New Rule**.
3. Select condition:
   * `Declared or Incident attributes are updated`.
4. Configure the conditions as required.
5. In the **Notify** field, select the **webhook you created**.
6. For auto-resolution, enable **Renotify on: Status Update**.

![Datadog Notification Rules](/files/wLmxM8dYmS1MwBH2Oojp)

***

At Spike, we’re committed to integrating with the tools your team already uses. Our mission is to help you detect incidents, crashes, and spikes before your customers do.

If you’d like us to build a new integration, contact us at [**support@spike.sh**](mailto:support@spike.sh).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.spike.sh/integrations-guideline/integrate-spike-with-datadog.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
