Datadog Webhook

You can configure the Datadog webhook to post notifications to the Events API when events of interest occur. Read the Datadog docs for details on Datadog components.

Before You Begin

This integration was validated with Datadog on May 13, 2020. Before you start to set up your integration, ensure you have met the following requirements:

  • You have an active Datadog account.

  • You have the necessary permissions to create webhooks in Datadog.

  • Datadog can make requests to external endpoints over port 443. This is the default.

Define the webhook in Datadog

To create a new webhook in Datadog, do the following:

  1. Choose Integrations > Webhook and define a new webhook.

  2. Specify the URL, Custom header, and Payload as described below.

  3. For each DataDog monitor of interest, make sure that the message notification text includes the string @webhook-your-webhook-name -- for example,@webhook-express-outbound-webhook .

Each POST request must include the following. For more help, read the Datadog docs.

URL

The endpoint shown in the Express web UI > Integrations > Events API page -- for example, https://myinstance.moogsoft.express.com/events

Custom header

Add the following header as a JSON object:

{
    "apiKey": "my-express-apiKey"
}

To determine your API key, go to the Express UI > Integrations > Events page. This page includes sample cURL commands that include the API key for your instance.

Payload

The following JSON data structure shows an example payload with Datadog variables included. Note that only the source, severity, description, check, and service fields are required. The tags value enables you to specify custom data that is not defined in the standard schema. You can also enrich your alerts with additional information from your environment, as described in Enrich Events with Additional Data.

{
    "description": "$EVENT_TITLE",
    "severity": "$ALERT_TYPE",
    "source": "$HOSTNAME",
    "check": "$EVENT_TYPE",
    "time": $DATE,
    "manager": "Datadog",
    "manager_id": "$ID",
    "service": [
 	"devops-east",
	"web-services-frontend"
   ],
    "tags": {
        "details":"$ALERT_STATUS",
        "event_type":"$EVENT_TYPE"
    }
}