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

# Datadog

> Connect Datadog monitoring to All Quiet

<Info>Setup time: 5 Min</Info>

Integrate Datadog's notifications with All Quiet's Webhooks for streamlined incident management.

## 1. Create an integration on All Quiet

### Create a Datadog integration

1. Click on the `Inbound Integrations` tab.
2. Click on `+ Create`.

<img className="DD_Create" src="https://mintcdn.com/allquiet/DD3fFjQiex-iZR__/images/datadog/01.1.png?fit=max&auto=format&n=DD3fFjQiex-iZR__&q=85&s=c4422603074813714854085d0c9e2c7a" width="2740" height="678" data-path="images/datadog/01.1.png" />

### Select Datadog as the integration's type

1. Enter a `Display Name` for your integration, e.g. "Datadog".
2. Select a `Team`.
3. Select `Datadog` as the integration's type.
4. Click `Create Inbound Integration`.

<img className="DD_Select" src="https://mintcdn.com/allquiet/DD3fFjQiex-iZR__/images/datadog/01.2.png?fit=max&auto=format&n=DD3fFjQiex-iZR__&q=85&s=5576531f6347b9fbef8bb524c755ada0" width="2155" height="1855" data-path="images/datadog/01.2.png" />

### Get the All Quiet webhook URL

Copy your integration's webhook URL. You'll need it later on the Datadog platform to connect Datadog alerts with All Quiet.

<img className="DD_Get" src="https://mintcdn.com/allquiet/DD3fFjQiex-iZR__/images/datadog/01.3.png?fit=max&auto=format&n=DD3fFjQiex-iZR__&q=85&s=428a4f74b76f392234b6d8de5b3cb516" width="2170" height="946" data-path="images/datadog/01.3.png" />

## 2. Configure DataDog

The following steps will be done on the Datadog platform. So, log in to Datadog with your account.

### Install Webhooks integration

1. In the navigation menu, click on `Integrations`
2. Install the `Webhooks` integration and configure it

<img className="DD_Install" src="https://mintcdn.com/allquiet/y65KzxFgbkd3W3cK/images/datadog/02.1.png?fit=max&auto=format&n=y65KzxFgbkd3W3cK&q=85&s=cddda0f8b381d0c43eb870fdcfd515be" width="1402" height="1117" data-path="images/datadog/02.1.png" />

### Create a new webhook

In the `Configuration` tab, click on `New Webhook`

<img className="DD_Webhook" src="https://mintcdn.com/allquiet/y65KzxFgbkd3W3cK/images/datadog/02.2.png?fit=max&auto=format&n=y65KzxFgbkd3W3cK&q=85&s=bd678bd21138dc0e724ed1b245318609" width="1645" height="1660" data-path="images/datadog/02.2.png" />

### Configure DataDog webhook

1. Give your webhook a name, e.g. "All-Quiet-Webhook"
2. Paste in the All Quiet webhook URL you've obtained in step [Get The All Quiet Webhook URL](/integrations/inbound/datadog#get-the-all-quiet-webhook-url).
3. Configure the payload that Datadog should send to All Quiet. You can copy & paste the JSON snippet `datadog-payload.json` provided below.
4. Finally, save the integration.

```JSON datadog-payload.json theme={null}
{
    "body": "$EVENT_MSG",
    "last_updated": "$LAST_UPDATED",
    "event_type": "$EVENT_TYPE",
    "title": "$EVENT_TITLE",
    "date": "$DATE",
    "org": {
        "id": "$ORG_ID",
        "name": "$ORG_NAME"
    },
    "id": "$ID",
    "alert_id": "$ALERT_ID",
    "alert_status": "$ALERT_STATUS",
    "alert_title": "$ALERT_TITLE",
    "alert_type": "$ALERT_TYPE",
    "alert_metric": "$ALERT_METRIC",
    "alert_priority": "$ALERT_PRIORITY",
    "link":"$LINK",
    "snapshot":"$SNAPSHOT"
}
```

<img className="DD_Configure" src="https://mintcdn.com/allquiet/y65KzxFgbkd3W3cK/images/datadog/02.3.png?fit=max&auto=format&n=y65KzxFgbkd3W3cK&q=85&s=4b1e372536649aadf99b93944eae85de" width="1642" height="1245" data-path="images/datadog/02.3.png" />

### Configure your monitor

1. Click on `Monitors`
2. Select one of your monitors and open its edit page. In this example, the monitor's name was "My Watchdog Monitor".
3. In the subsection "Configure notifications & automations", tag your newly created hook with "@webhook-Your-Webhook-Name". This will tell Datadog to use your webhook integration as a notification destination.

<img className="DD_Severity" src="https://mintcdn.com/allquiet/y65KzxFgbkd3W3cK/images/datadog/02.4.png?fit=max&auto=format&n=y65KzxFgbkd3W3cK&q=85&s=85d8e69b7fb186e5e505a96d614405c5" width="2473" height="2019" data-path="images/datadog/02.4.png" />

### Set your monitor's priority

1. Within step "Configure notifications & automations", scroll down to section "Metadata"
2. You'll find a select box to set the priority of your monitor.
3. `P1`,`P2` will map to severity `Critical`
4. `P3`,`P4` will map to severity `Warning`
5. `P5` will map to severity `Minor`
6. If you don't specify a priority, the incident's severity will be `Critical`

<img className="DD_Severity" src="https://mintcdn.com/allquiet/y65KzxFgbkd3W3cK/images/datadog/02.4.1.png?fit=max&auto=format&n=y65KzxFgbkd3W3cK&q=85&s=f061fed8d64cc570104f9dbf99d740ca" width="2115" height="1898" data-path="images/datadog/02.4.1.png" />

## 3. Test Notifications

These steps are important to successfully test your Datadog integration on the All Quiet side.

1. Click on `Test notifications` at the very bottom of the edit page.
2. Select `Alert` and click on `Run Test` to send out notifications to your newly created All Quiet integration.
3. Finally, don't forget to `Save` your integration!

<img className="DD_Test" src="https://mintcdn.com/allquiet/y65KzxFgbkd3W3cK/images/datadog/02.5.png?fit=max&auto=format&n=y65KzxFgbkd3W3cK&q=85&s=3afc9e15cc356cd6ee2564c9bd34f8f2" width="2037" height="2064" data-path="images/datadog/02.5.png" />

<Check>
  {" "}

  Datadog's notifications with Webhooks are now successfully integrated into All
  Quiet, offering enhanced incident management capabilities and efficient policy
  management through an intuitive interface.
</Check>

### Datadog Alert as All Quiet Incident

You're done. 🥳 The next steps are merely there to verify if everything's setup correctly!

Go back to the All Quiet Web App and navigate to the “Incidents” overview. You will see the test incident created by Datadog. Open the details page to see the incident created. If you are missing anything, you can adjust the Alert on Datadog to send the info required and map it against an All Quiet incident in the payload mapping section of your Datadog inbound integration page on All Quiet.

<img className="DD_Payload" src="https://mintcdn.com/allquiet/DD3fFjQiex-iZR__/images/datadog/02.6.png?fit=max&auto=format&n=DD3fFjQiex-iZR__&q=85&s=12b80551724d7c4da2d7bae9ffc46d8f" width="2176" height="1242" data-path="images/datadog/02.6.png" />

### Adjust Payload Mapping

Looking to customize the fields of your incidents by adjusting the pre-built payload mapping? Simply head over to the “Payload” tab within your integration and make the necessary edits to the mapping. For detailed guidance, you may check out our [payload mapping documentation](/essentials/inbound#how-does-attribute-mapping-work).

<Tip>Using our Terraform provider? [Download](https://allquiet.app/api/integrations/terraform/default/Datadog.tf) the default mapping of the `allquiet_integration_mapping` resource for the Datadog integration. Simply copy the syntax to your .tf file and tailor the resource to your team's needs!</Tip>
