NS1 supports two integrations with Datadog: inbound (from Datadog to NS1; for monitoring) and outbound (from NS1 to Datadog; for reporting). This article describes the inbound integration: NS1 pulls information from the Datadog platform, so most of the resource management takes place within NS1. Alternatively, you can configure NS1 as an outbound data source in which Datadog pulls information from the NS1 platform.
Creating a Webhook in your Datadog Account
1. When logged in to your Datadog account, click Integrations in the left-side navigation. Search for the Webhooks integration and install it.
2. Within the Webhooks integration menu, select the Configuration tab. Scroll down and select the New button (highlighted with a red border in the screenshot below) to add a new Webhook.
Fill out the subsequent fields while considering the following:
Name: Enter a name for your Webhook. This does not need to match any of the information entered when creating your data feed in the NS1 portal.
URL: Enter the Feed URL generated in the Incoming Feeds section of the NS1 portal. The screenshot displayed below in Step 5 of Connecting to Datadog in the NS1 Portal shows the location of the Feed URL generated upon creating a data source and feed in the NS1 portal.
Click Save at the bottom of the menu after filling in the sections as desired.
3. Click Monitors in the left-side navigation, and then click the New Monitor button in the upper-right corner of the menu.
4. Choose the appropriate monitor type. This integration is compatible with Host, Metric, Custom Check, Event, and Outlier types.
5. Fill out your monitoring preferences as desired and then click the Save button.
The Monitor Name entered in Step 3 (shown in the screenshot below) must match the name you enter in the Datadog monitor name field in the NS1 portal (shown below in Step 5 of Connecting to Datadog in the NS1 Portal), and the monitoring message needs to include a request to notify the Webhook you created (eg. Notify @webhook-NS1_Webhook).
Connecting to Datadog in the NS1 Portal
1. Log in to the NS1 portal. Select DNS in the main navigation bar, select the Integrations tab, and then click the "+" button on the right side of the screen.
2. In the pop-up menu, click the Datadog logo to select it as the source type.
3. Enter a name (for internal reference) for your data source. As it implies, this name does not need to match anything entered in your Datadog account. When finished, click the Create Data Source button.
4. Your Datadog data source now exists. The Create Data Source button should now be a Create a new feed with this datasource? button. Click the button to bring up the data feed menu.
5. Fill out the fields as desired while considering the following before clicking Submit:
- Fail on “Warning”: If you have configured any warnings in Datadog, it is possible to have these alerts result in a Down marking by checking the box. If left unchecked, up/down will be left unchanged from the prior state.
- Fail on “No Data”: Datadog will report one of four statuses - Triggered, Recovered, Warning, or No Data. Triggered status will always result in a Down marking and Recovered in Up. If the box is checked, No Data status will result in a Down marking. If left unchecked, there will be no impact to up/down status.
- Datadog monitor name: This must be an exact match for the monitor name entered in your Datadog account.
After clicking Submit, Your Datadog data feed now exists and should display within the Incoming Feeds tab. Also, note your unique Feeds URL which will be needed when creating your Webhook via your Datadog account.
6. Now navigate to the Zones tab of the NS1 portal, select your zone and then your record that contains answers you wish to monitor via Datadog.
7. Within the answer you wish to associate with the Datadog integration, click the three-dots icon on the right side of the menu, and then click Edit Answer Metadata.
8. In the pop-up menu, navigate to the Up/down setting, and click the feed icon (highlighted with a red border in the screenshot) next to that setting.
9. Click the Datadog data feed you just created, then click the Ok button at the bottom of the menu.
The Datadog data feed should now appear as a label beneath that answer.
The Datadog data source and data feed are now established. But in order for this integration to impact traffic-steering decisions, you need to configure NS1 Filter Chain settings, specifically adding the Up metric.
If your Filter Chain is already configured with the Up filter, the Up icon will appear in the sequence of filters shown on the left side of the menu.