# Datadog

[<mark style="color:blue;">Datadog</mark>](https://www.datadoghq.com/) is a monitoring platform for cloud applications that bring in together data from servers, containers, databases, and third-party services, thus providing observability into the entire stack.

Route detailed monitoring alerts from Datadog to the right users in Squadcast.

### How to integrate Datadog with Squadcast

### In Squadcast: Using Datadog as an Alert Source

1. Navigate to **Services** -> **Service Overview** -> select or search for your Service. Expand the accordion -> In the Alert Sources section, click **Add**.

![](/files/ej4AI9zpOyFu5NZJCbwC)

2\. Select **Datadog**. Copy the displayed **Webhook URL** to [configure](#in-datadog-create-a-squadcast-webhook) it within **Datadog**. Finish by clicking **Add Alert Source** -> **Done**.

![](/files/MOlcxResAwdUMw5u3YaA)

{% hint style="warning" %} <mark style="color:orange;">**Important**</mark>**:**

When an alert source turns <mark style="color:green;">Active</mark>, it’ll show up under Configured Alert Sources. You can either generate a test alert from the integration or wait for a real-time alert to be generated by the Alert Source.\
\
An Alert Source is <mark style="color:green;">active</mark> if there is a recorded incident via that Alert Source for the Service.
{% endhint %}

### In Datadog: Create a Squadcast Webhook

1. Open the **Integrations** page from the sidebar

![](/files/N1fRFBTgMOYyWVUtb8eN)

2. Search for **Webhooks**. Once the Webhooks tile appears, hover over it and click on "Configure"

![](/files/gRXDldK8bCb2YFSf17Fa)

3. Navigate to the **Configuration** tab

![](/files/4rTw7xzQS8UKeJsl7Vbq)

4. Scroll to the bottom of the page. Click on `New Webhook` to add a new Webhook URL

![](/files/WzM8jrC5HK3cpo5eaVdU)

5. (a) Give the Webhook a name in the Name field

(b) Paste the **Datadog Webhook URL** provided by Squadcast in the URL field

(c) Copy-paste the following JSON in the text box under the **Payload** section

```json
{
    "alertId": "$ALERT_ID",
    "eventMessage": "$TEXT_ONLY_MSG",
    "title": "$EVENT_TITLE",
    "url": "$LINK",
    "alertTransition": "$ALERT_TRANSITION",
    "hostname": "$HOSTNAME",
    "orgName":"$ORG_NAME",
    "priority":"$PRIORITY",
    "snapshot": "$SNAPSHOT",
    "alertQuery": "$ALERT_QUERY",
    "alertScope": "$ALERT_SCOPE",
    "alertStatus": "$ALERT_STATUS",
    "eventType": "$EVENT_TYPE",
    "event_id": "$ID",
    "alert_metric": "$ALERT_METRIC",
    "alert_priority": "$ALERT_PRIORITY",
    "alert_title": "$ALERT_TITLE",
    "alert_type" : "$ALERT_TYPE",
    "event_msg" : "$EVENT_MSG",
    "incident_pub_id" : "$INCIDENT_PUBLIC_ID",
    "incident_title" : "$INCIDENT_TITLE",
    "incident_url" : "$INCIDENT_URL",
    "incident_msg" : "$INCIDENT_MSG",
    "security_rule_id" : "$SECURITY_RULE_ID",
    "security_rule_name" : "$SECURITY_RULE_NAME",
    "security_signal_severity" : "$SECURITY_SIGNAL_SEVERITY",
    "security_signal_title" : "$SECURITY_SIGNAL_TITLE",
    "security_signal_msg" : "$SECURITY_SIGNAL_MSG",
    "security_rule_query" : "$SECURITY_RULE_QUERY",
    "security_rule_type" : "$SECURITY_RULE_TYPE",
    "tags" : "$TAGS"
}
```

![](/files/4lrxIsPEHQzhUnJyMPNj)

Click on “Save” to complete the service integration.

{% hint style="info" %} <mark style="color:blue;">**Note**</mark>**:**\
\
You can find detailed information on the variables supported by Datadog that are available within the alert payload in Squadcast [here](https://docs.datadoghq.com/integrations/webhooks/).
{% endhint %}

{% hint style="warning" %} <mark style="color:orange;">**Important**</mark>**:**\
\
Once the Webhook for Squadcast has been configured, ensure that the same is also selected as a channel within **Notify your team** about the **Monitor's** configuration.
{% endhint %}

That's it, you are good to go! Your Datadog integration is now complete.

* Now, whenever Datadog fires an alert, an incident will be created in Squadcast for it.
* When the alert recovers in Datadog, the corresponding incident will **automatically get resolved** in Squadcast as well.

*Have any questions?* [*Ask the community*](https://community.squadcast.com/view/home)*.*


---

# 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://support.squadcast.com/integrations/alert-source-integrations-native/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.
