When a Datadog alert fires, you might be doing something more important. But, you don't want to forget about it. With this workflow, you can automatically send a message to a Slack channel when a Datadog event is received.
Before you run this workflow, you will need the following:
Follow these steps to configure the workflow. Doing this will enable Relay to listen for alerts from Datadog and create messages in Slack.
Follow these instructions to set up your Datadog trigger.
From the main workflow page, find the datadog
trigger and click the Copy webhook URL button.
In Datadog, add a new webhook:
- Click on the Integrations menu option.
- Install or configure the Webhooks Integration.
- Under Webhooks, click New +.
- Provide a meaningful name (e.g.
relay-webhook
) - Paste the URL to the webhook URL found in Relay.
- Additional properties can be added to the payload for workflow customization.
- Provide a meaningful name (e.g.
- Click Save.
Configure the Datadog monitor:
- Within the Monitor, click Settings(⚙) -> Edit
- Under Say what's happening, add the above webhook with
@webhook-{name of webhook}
(e.g.@webhook-relay
)
-
Click Save
-
Define the following parameters:
slackChannel
: the slack channel to send notifications to.
-
Configure a Slack connection in Relay.
- The default name is
slack-connection
.
- The default name is
In the workflow overview page in Relay, find the webhook URL by navigating to the Setup sidebar.
In Datadog, add a new webhook:
- Click on the Integrations menu option.
- Install or configure the Webhooks Integration.
- Under Webhooks, click New +.
- Provide a meaningful name.
- Update the URL to the webhook URL found in Relay.
- Additional properties can be added to the payload for workflow customization.
- Click Save.
Configure the Datadog monitor:
- Within the Monitor, click Settings(⚙) -> Edit
- Under Say what's happening, add the above webhook with
@webhook-{name of webhook}
(e.g.@webhook-relay
) - Click Save
To test the Datadog alert:
- Navigate to the Monitor that you configured earlier.
- Click Settings(⚙) -> Edit
- Scroll to the bottom of the page and click Test Notifications
- Select Alert (default)
- Click Run Test