Skip to content

Connecting to Datadog#

First Steps with Datadog#

Set up an account with Datadog.

Cost

This is a paid API.

Rate Limits

All of the API endpoints are rate limited. Once you exceed a certain number of requests in a specific period, Datadog returns an error.

How to Connect DataDistillr to Datadog#

To set up a data source connection for Datadog, you will need to have:

  • A unique name for your data source connection to be used in queries.
  • The API Key generated by Datadog.
  • The Application Key generated by Datadog.

Data Source Form#

To locate the Datadog form, follow the steps in Connecting Your Data to DataDistillr. When you get to the window to choose the data source type, select API as shown below.

Select API from the available choices

On the API screen, select Datadog from list of API forms as shown in the image below.

Select Datadog API from available choices

The following form will appear. Instructions can be found below on how to find the information required to fill each field on the Datadog API form.

Once you have filled out all the fields, press the green 'Save' button, and your API will be connected!

Datadog Form

Name#

Enter any name that will help you recognize this data source from within your query window.

Acceptable characters include

  • lowercase alphanumeric characters
  • underscores

API Key#

You can access your API Key at your Datadog API Key Page. Sign in. Sign in

Click on the API Key. Generate API Key

Click the blue 'Copy' key to copy your API, and paste into the form. Copy API Key

Application Key#

You can access your Application Key at your Datadog Application Key Page. Sign in. Sign in

Hover your mouse over the Application Key and click the copy icon on the right hand side. Paste this Application Key into the form.

Copy Application Key

Endpoints#

The table below shows a list of endpoints available to connect to within the DataDistillr application. If you need to connect to any endpoints not listed in the table below, please use the Custom API Form.

Endpoint Required Params Optional Params Description
synthetics public_id from_ts
to_ts
probe_dc
Returns the list of all Synthetic tests.
metrics from host
tag_filter
Returns active Metrics list.
events start
end
This endpoint queries the event stream.

The endpoint above will display as follows in the nav tree once your API has successfully connected.

Datadog Endpoints

Sample Queries#

The following queries are intended to help you get started, and make life simpler querying within your API.

For the following examples, suppose that my Datadog data source was called mydatadog and I want to query an endpoint. The endpoint goes after the Datadog data source name:

FROM Clause

FROM `mydatadog`.`<ENDPOINT>`

Get Synthetics Endpoint#

Get the list of all Synthetic tests. This endpoint requires the Datadog synthetics_read authorization scope.

SELECT * FROM `mydatadog`.`synthetics`
WHERE public_id = '<PUBLIC_ID>'
LIMIT 1000

Get Metrics Endpoint#

Get the list of actively reporting metrics from a given time until now. This endpoint requires the metrics_read authorization scope.

SELECT * FROM `mydatadog`.`metrics`
WHERE from = '1643111571'
LIMIT 1000

Get Events Endpoint#

The event stream can be queried and filtered by time, priority, sources and tags.

SELECT * FROM `mydatadog`.`synthetics`
WHERE start=1641071432 AND end=1643521168
LIMIT 1000