Here's how to set up a webhook to receive Datadog monitor alerts in Transposit.
Once configured, you can:
Follow the steps below to integrate Datadog monitor alerts with Transposit.
Go to Settings > Webhooks, and click Add webhook. Choose Datadog monitor alerts, as shown below.
Note: The optional Slack channel must already exist, create it before adding the webhook.
Click Add and then find the webhook you just added in the list. Click Click to copy to copy the URL to the clipboard or manually copy the endpoint URL.
Follow the "Webhooks Integration" instructions on the Datadog site and create a webhook, as shown below.
Replace the payload above with the below so that Transposit will be able to provide a more expressive visualization in Slack and in Transposit when Datadog monitor alerts are received.
{ "AGGREG_KEY": "$AGGREG_KEY", "ALERT_CYCLE_KEY": "$ALERT_CYCLE_KEY", "ALERT_ID": "$ALERT_ID", "ALERT_METRIC": "$ALERT_METRIC", "ALERT_PRIORITY": "$ALERT_PRIORITY", "ALERT_QUERY": "$ALERT_QUERY", "ALERT_SCOPE": "$ALERT_SCOPE", "ALERT_STATUS": "$ALERT_STATUS", "ALERT_TITLE": "$ALERT_TITLE", "ALERT_TRANSITION": "$ALERT_TRANSITION", "ALERT_TYPE": "$ALERT_TYPE", "DATE": "$DATE", "EMAIL": "$EMAIL", "EVENT_MSG": "$EVENT_MSG", "EVENT_TITLE": "$EVENT_TITLE", "EVENT_TYPE": "$EVENT_TYPE", "HOSTNAME": "$HOSTNAME", "ID": "$ID", "LAST_UPDATED": "$LAST_UPDATED", "LINK": "$LINK", "LOGS_SAMPLE": "$LOGS_SAMPLE", "METRIC_NAMESPACE": "$METRIC_NAMESPACE", "ORG_ID": "$ORG_ID", "ORG_NAME": "$ORG_NAME", "PRIORITY": "$PRIORITY", "SNAPSHOT": "$SNAPSHOT", "TAGS": "$TAGS", "TEXT_ONLY_MSG": "$TEXT_ONLY_MSG", "USER": "$USER", "USERNAME": "$USERNAME" }
For an explanation of the variables above, see the Datadog Webhook documentation.
The payload should now be structured as below.
Create a new monitor in Datadog, as shown below.
When you are defining the monitor, use the name of the Datadog webhook you defined above, as shown below, in the format @webhook-<WEBHOOK_NAME>, in the monitor definition.
For reference, see the Datadog Webhook documentation, in particular the following:
To use your webhook, add @webhook-<WEBHOOK_NAME> in the text of the metric alert you want to trigger the webhook.
When a Datadog monitor is triggered, you should see Datadog monitor alerts displayed as events in Transposit, as shown below.
In Slack, if you defined the webhook in Transposit to support Slack, you should see Datadog monitor alerts displayed, too, as shown below.