Datadog Component
Interact with the Datadog API to submit metrics, manage webhooks, and monitor your infrastructure and application performance.
Component key: datadog
Description
Datadog is a monitoring and analytics platform for cloud-scale infrastructure, applications, and logs. This component allows submitting metrics, managing webhook integrations, and receiving monitor alert notifications from Datadog.
API Documentation
This component was built using the Datadog API Reference utilizing the v2 Metrics API and v1 Webhooks Integration API.
Connections
API Key + Application Key
key: apiKeyPrerequisites
To configure this connection, the following are required:
- A Datadog account with appropriate permissions
- A Datadog API Key (created under Organization Settings > API Keys)
- A Datadog Application Key (created under Organization Settings > Application Keys)
Setup Steps
- Log in to the Datadog account.
- Navigate to Organization Settings > API Keys.
- Click + New Key to create an API Key. Copy the key value.
- Navigate to Organization Settings > Application Keys.
- Click + New Key to create an Application Key. Copy the key value.
- Note the Datadog site/region (e.g., US1, EU, US3).
Configure the Connection
Create a connection of type API Key + Application Key and enter:
| Field | Description |
|---|---|
| Datadog Site | Select the Datadog site that matches the organization (US1, US3, US5, EU, AP1, AP2, or US1-FED). |
| API Key | The Datadog API Key. Identifies the organization. |
| Application Key | The Datadog Application Key. Authorizes management and read operations. |
| Input | Notes | Example |
|---|---|---|
| API Key | The Datadog API Key. Create one at Organization Settings > API Keys in Datadog. | a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6 |
| Application Key | The Datadog Application Key. Required for management and read endpoints. Create one at Organization Settings > Application Keys in Datadog. | a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0 |
| Datadog Site | Select the Datadog site that matches your organization. This determines the API base URL. | https://api.datadoghq.com |
OAuth 2.0 Authorization Code
key: oauth2Prerequisites
To configure this connection, the following are required:
- A Datadog account with organization admin permissions
- A registered OAuth application with Datadog (typically for marketplace/partner integrations)
- The Client ID and Client Secret from the OAuth application
Setup Steps
- Register the application with Datadog as an integration partner.
- Obtain the Client ID and Client Secret from the Datadog Developer Platform.
- Configure the required OAuth scopes for the use case (e.g., metrics_read, create_webhooks).
- Note the Datadog site/region (e.g., US1, EU, US3).
Configure the Connection
Create a connection of type OAuth 2.0 Authorization Code and enter:
| Field | Description |
|---|---|
| Datadog Site | Select the Datadog site that matches the organization. |
| Scopes | Space-separated OAuth scopes. Available: metrics_read, timeseries_query, metric_tags_manage, create_webhooks. |
| Client ID | The Client ID from the Datadog OAuth application. |
| Client Secret | The Client Secret from the Datadog OAuth application. |
The Authorize URL and Token URL are pre-configured for the standard Datadog OAuth endpoints.
| Input | Notes | Example |
|---|---|---|
| Authorize URL | The Datadog OAuth 2.0 authorization endpoint. | https://app.datadoghq.com/oauth2/v1/authorize |
| Client ID | The Client ID from your Datadog OAuth application. | |
| Client Secret | The Client Secret from your Datadog OAuth application. | |
| Datadog Site | Select the Datadog site that matches your organization. This determines the API base URL. | https://api.datadoghq.com |
| Revoke URL | The Datadog OAuth 2.0 token revocation endpoint. | https://api.datadoghq.com/oauth2/v1/revoke |
| Scopes | Space-separated OAuth 2.0 scopes. Available scopes include: metrics_read, timeseries_query, metric_tags_manage, create_webhooks. | metrics_read timeseries_query metric_tags_manage create_webhooks |
| Token URL | The Datadog OAuth 2.0 token endpoint. | https://api.datadoghq.com/oauth2/v1/token |
Triggers
Alert Notification Events
Receive Datadog monitor alert notifications via webhook. Automatically registers a webhook in Datadog on deploy and removes it on delete. | key: webhook
| Input | Notes | Example |
|---|---|---|
| Connection | The Datadog connection to use for authentication. | |
| Custom Headers | Custom headers to attach to webhook requests as a JSON string. Useful for authentication headers. | |
| Webhook Name | The name of the webhook. Used in Datadog monitor notifications as @webhook-NAME. | my-integration-webhook |
| Payload | Custom JSON payload for the webhook. If not provided, uses the default Datadog payload with standard variables like $ALERT_TITLE, $ALERT_STATUS, etc. |
The Webhook trigger receives alert notifications from Datadog monitors. When a monitor changes state (e.g., from OK to Alert), Datadog sends an HTTP POST to the configured webhook URL with details about the alert.
How It Works
- On Instance Deploy: The trigger automatically creates a webhook integration in Datadog pointing to the instance's webhook URL.
- Monitor Configuration: Configure Datadog monitors to notify
@webhook-<name>where<name>matches the Webhook Name configured in the trigger. - On Alert: When a monitor triggers, Datadog sends the alert payload to the webhook URL.
- On Instance Deletion: The trigger removes the webhook integration from Datadog.
Event Types
Alert Transitions (5)
| Alert Transition | Description |
|---|---|
| Triggered | Monitor threshold exceeded, alert fires |
| Recovered | Monitor returned to normal state |
| Re-Notified | Ongoing alert re-notification |
| No Data | Monitor reports no data received |
| Warn | Monitor entered warning state |
Refer to Datadog's monitor notification documentation for details on configuring monitor alerts.
Returned Data
Example Payload
{
"ALERT_ID": "12345678",
"ALERT_METRIC": "system.load.1",
"ALERT_QUERY": "avg(last_5m):avg:system.load.1{host:my-host} > 5",
"ALERT_SCOPE": "host:my-host",
"ALERT_STATUS": "Triggered",
"ALERT_TITLE": "CPU load is high on my-host",
"ALERT_TRANSITION": "Triggered",
"ALERT_TYPE": "metric alert",
"DATE": "2024-01-15 10:30:00 UTC",
"HOSTNAME": "my-host",
"LINK": "https://app.datadoghq.com/monitors/12345678",
"ORG_NAME": "My Organization",
"TAGS": "environment:production,region:us-east-1"
}
Notes
- The Webhook Name must be unique within the Datadog organization.
- After deploying, add
@webhook-<name>to the monitor's notification message in Datadog. - Custom payloads can use Datadog template variables like
$ALERT_TITLE,$HOSTNAME,$TAGS, etc.
Data Sources
Select Metric
A searchable picklist of metric names in your Datadog account. | key: selectMetric | type: picklist
| Input | Notes | Example |
|---|---|---|
| Connection | The Datadog connection to use for authentication. |
{
"result": [
{
"label": "system.cpu.idle",
"key": "system.cpu.idle"
},
{
"label": "system.cpu.user",
"key": "system.cpu.user"
},
{
"label": "system.disk.free",
"key": "system.disk.free"
},
{
"label": "system.load.1",
"key": "system.load.1"
}
]
}
Actions
Create Webhook
Create a new webhook integration endpoint in Datadog. The webhook can then be referenced in monitor notifications as @webhook-NAME. | key: createWebhook
| Input | Notes | Example |
|---|---|---|
| Connection | The Datadog connection to use for authentication. | |
| Custom Headers | Custom headers to attach to webhook requests as a JSON string. Useful for authentication headers. | |
| Encode As | Encoding type for the webhook payload. Defaults to "json". | |
| Webhook Name | The name of the webhook. Used in Datadog monitor notifications as @webhook-NAME. | my-integration-webhook |
| Payload | Custom JSON payload for the webhook. If not provided, uses the default Datadog payload with standard variables like $ALERT_TITLE, $ALERT_STATUS, etc. | |
| Webhook URL | The URL of the webhook endpoint that will receive the data. | https://hooks.example.com/datadog |
{
"data": {
"name": "WEBHOOK_NAME",
"url": "https://example.com/webhook",
"custom_headers": null,
"encode_as": "json",
"payload": null
}
}
Delete Webhook
Delete a Datadog webhook integration by name. This action cannot be undone. | key: deleteWebhook
| Input | Notes | Example |
|---|---|---|
| Connection | The Datadog connection to use for authentication. | |
| Webhook Name | The name of the webhook. Used in Datadog monitor notifications as @webhook-NAME. | my-integration-webhook |
{
"data": null
}
Get Webhook
Retrieve the configuration of a specific Datadog webhook integration by name. | key: getWebhook
| Input | Notes | Example |
|---|---|---|
| Connection | The Datadog connection to use for authentication. | |
| Webhook Name | The name of the webhook. Used in Datadog monitor notifications as @webhook-NAME. | my-integration-webhook |
{
"data": {
"name": "WEBHOOK_NAME",
"url": "https://example.com/webhook",
"custom_headers": null,
"encode_as": "json",
"payload": null
}
}
List Metrics
List active metric names that have reported data since a given timestamp, with optional host and tag filtering. | key: listMetrics
| Input | Notes | Example |
|---|---|---|
| Connection | The Datadog connection to use for authentication. | |
| From | Unix timestamp (seconds) from which to list active metrics. Metrics reported after this time are returned. | 1636629071 |
| Host | Hostname to filter the list of active metrics. Only metrics reported by this host are returned. | my-host |
| Tag Filter | Filter metrics by tag. Supports boolean expressions (e.g., "env:production AND role:web"). | env:production |
{
"data": {
"metrics": [
"system.cpu.idle",
"system.cpu.user",
"system.disk.free",
"system.load.1",
"system.mem.free"
],
"from": "1636629071"
}
}
Raw Request
Send a raw HTTP request to any Datadog API endpoint. | key: rawRequest
| Input | Notes | Example |
|---|---|---|
| Connection | The Datadog connection to use for authentication. | |
| Data | The HTTP body payload to send to the URL. | {"exampleKey": "Example Data"} |
| Debug Request | Enabling this flag will log out the current request. | false |
| File Data | File Data to be sent as a multipart form upload. | [{key: "example.txt", value: "My File Contents"}] |
| File Data File Names | File names to apply to the file data inputs. Keys must match the file data keys above. | |
| Form Data | The Form Data to be sent as a multipart form upload. | [{"key": "Example Key", "value": new Buffer("Hello World")}] |
| Header | A list of headers to send with the request. | User-Agent: curl/7.64.1 |
| Max Retry Count | The maximum number of retries to attempt. Specify 0 for no retries. | 0 |
| Method | The HTTP method to use. | |
| Query Parameter | A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2. | |
| Response Type | The type of data you expect in the response. You can request json, text, or binary data. | json |
| Retry On All Errors | If true, retries on all erroneous responses regardless of type. This is helpful when retrying after HTTP 429 or other 3xx or 4xx errors. Otherwise, only retries on HTTP 5xx and network errors. | false |
| Retry Delay (ms) | The delay in milliseconds between retries. This is used when 'Use Exponential Backoff' is disabled. | 0 |
| Timeout | The maximum time that a client will await a response to its request | 2000 |
| URL | The URL path to send the request to. The base URL is determined by the Datadog Site configured in the connection. For example, to call the Submit Metrics endpoint, enter /api/v2/series. | /api/v2/series |
| Use Exponential Backoff | Specifies whether to use a pre-defined exponential backoff strategy for retries. When enabled, 'Retry Delay (ms)' is ignored. | false |
Search Metrics
Search for Datadog metrics by name prefix. Returns matching metric names. | key: searchMetrics
| Input | Notes | Example |
|---|---|---|
| Connection | The Datadog connection to use for authentication. | |
| Query | Search query to find metrics by name prefix. The "metrics:" prefix is added automatically. | system.cpu |
{
"data": {
"results": {
"metrics": [
"system.cpu.idle",
"system.cpu.iowait",
"system.cpu.system",
"system.cpu.user"
]
}
}
}
Submit Metrics
Submit time-series metric data to Datadog for graphing on dashboards. Uses the v2 API endpoint. | key: submitMetrics
| Input | Notes | Example |
|---|---|---|
| Connection | The Datadog connection to use for authentication. | |
| Metric Series | JSON array of metric series to submit. Each series must include "metric" (name) and "points" (array of {timestamp, value}). Optional fields: type, interval, unit, tags, resources. |
{
"data": {
"errors": []
}
}
Submit Single Metric
Submit a single metric data point to Datadog. For bulk submissions, use the Submit Metrics action. | key: submitSingleMetric
| Input | Notes | Example |
|---|---|---|
| Connection | The Datadog connection to use for authentication. | |
| Interval | The interval in seconds. Required if the metric type is rate or count. | 60 |
| Metric Name | The name of the timeseries metric (e.g., system.load.1, custom.my_metric). | system.load.1 |
| Tags | Tags associated with the metric. Each tag is a string in "key:value" format. | environment:production |
| Timestamp | Unix timestamp in seconds. Defaults to the current time if not provided. Must be within 10 minutes in the future or 1 hour in the past. | 1636629071 |
| Metric Type | The type of metric. Gauge is the default if unspecified. Count and Rate types require an interval. | |
| Unit | The unit of the metric value (e.g., byte, second, request). | byte |
| Value | The numeric value for the metric data point (64-bit float). | 0.7 |
| Resource Name | The name of the resource to associate with this metric (e.g., hostname). | my-host |
| Resource Type | The type of resource (e.g., "host"). | host |
{
"data": {
"errors": []
}
}
Update Webhook
Update the configuration of an existing Datadog webhook integration. | key: updateWebhook
| Input | Notes | Example |
|---|---|---|
| Connection | The Datadog connection to use for authentication. | |
| Custom Headers | Custom headers to attach to webhook requests as a JSON string. Useful for authentication headers. | |
| Encode As | Encoding type for the webhook payload. Defaults to "json". | |
| Webhook Name | The name of the webhook. Used in Datadog monitor notifications as @webhook-NAME. | my-integration-webhook |
| Payload | Custom JSON payload for the webhook. If not provided, uses the default Datadog payload with standard variables like $ALERT_TITLE, $ALERT_STATUS, etc. | |
| Webhook URL | The URL of the webhook endpoint that will receive the data. | https://hooks.example.com/datadog |
{
"data": {
"name": "WEBHOOK_NAME",
"url": "https://example.com/webhook",
"custom_headers": null,
"encode_as": "json",
"payload": null
}
}
Changelog
2026-03-06
Initial release of the Datadog component with support for submitting metrics, managing webhook integrations, and receiving monitor alert notifications via the Alert Notification Events trigger