Description: Canary supports outgoing Webhooks from the Console to an endpoint of your choice. This event-driven approach means you get your alerts in real time! Similarly, DataDog supports receiving log data via it's API endpoints.
Note: Before we start, we need to double check our Datadog Site region. At the time of writing, Datadog supports the following regions, however it's always worth checking the documentation.
You can spot which site you are on by checking the URL you access your Datadog dashboard from.
SITE | SITE URL | SITE PARAMETER | LOCATION |
---|---|---|---|
US1 | https://app.datadoghq.com |
datadoghq.com |
US |
US3 | https://us3.datadoghq.com |
us3.datadoghq.com |
US |
US5 | https://us5.datadoghq.com |
us5.datadoghq.com |
US |
EU1 | https://app.datadoghq.eu |
datadoghq.eu |
EU |
US1-FED | https://app.ddog-gov.com |
ddog-gov.com |
US |
AP1 | https://ap1.datadoghq.com |
ap1.datadoghq.com |
Japan |
In this guide, we'll use US5 / https://us5.datadoghq.com
, lets get started!
Step 1: Generate an API Key.
Head over to your DataDog API keys page: https://us5.datadoghq.com/organization-settings/api-keys
(Remember your region / URL may be different.)
From this page, select "New Key".
Enter a name for your new API Key.
You'll now be in receipt of a new API Key we can use in the Canary Console. (This key is accessible from the DataDog UI later incase you lose it.)
Step 2: Create a Generic Webhook
Login to your Canary Console.
Click on the Gear Icon and then Global Settings.
Scroll down to "Webhooks" then click on the + icon. (If you know your Console hash, you can head there directly with https://YOURHASH.canary.tools/nest/settings/webhooks
)
Select "Add Generic".
Enter the following details:
- Your DataDog Send Logs API endpoint URL. (
https://YOUR_DATADOG_REGION/api/v2/logs
) - A new header setting the
Accept: application/json
field. - A new header setting the
Content-Type: application/json
field. - A new header setting the
DD-API-KEY: ${YOUR_API_KEY}
field. (Using your previously generated API Key.)
Hit "Save" when you're done.
Logs will now be sent to your DataDog instance.