Integrations / Datadog
Datadog
Monitoring and incidents: monitors, events, metrics queries and incident lists (US1 site, api.datadoghq.com).
8 actions
API key
6 read2 write
Calls api.datadoghq.com
Connect
const conn = await setu.connections.initiate({ userId: "user_1", toolkit: "datadog" });
console.log(conn.connectUrl); // show this to your user
await conn.waitUntilActive();Permissions requested
This toolkit uses a single credential and requests no scopes.
Actions
Get monitorreaddatadog.get_monitorGet the full definition and current state of one monitor by its numeric id.
| Input | Type | Description | |
|---|---|---|---|
monitor_id | integer | Required | Monitor id |
await setu.execute({
userId: "user_1",
action: "datadog.get_monitor",
input: {
"monitor_id": 1
},
});List incidentsreaddatadog.list_incidentsList incidents from Datadog Incident Management (public beta endpoint; needs the incident_read permission).
| Input | Type | Description | |
|---|---|---|---|
page_size | integer | Optional | Incidents per page, maximum 100 |
page_offset | integer | Optional | Index to start the page from |
await setu.execute({
userId: "user_1",
action: "datadog.list_incidents",
input: {},
});List monitorsreaddatadog.list_monitorsList monitors in the Datadog account, optionally filtered by name or tags. Returns each monitor with its id, query, state and options.
| Input | Type | Description | |
|---|---|---|---|
name | string | Optional | Filter by monitor name (substring match) |
tags | string | Optional | Comma-separated monitor scope tags, e.g. host:web1 |
monitor_tags | string | Optional | Comma-separated monitor tags, e.g. service:web |
page_size | integer | Optional | Monitors per page (use with page) |
page | integer | Optional | Zero-based page number |
await setu.execute({
userId: "user_1",
action: "datadog.list_monitors",
input: {},
});Mute monitorwritedatadog.mute_monitorMute a monitor (optionally one scope, until a time) so it stops notifying. Use unmute_monitor to reverse it.
| Input | Type | Description | |
|---|---|---|---|
monitor_id | integer | Required | Monitor id |
scope | string | Optional | Scope to mute, e.g. host:app1 (default: all scopes) |
end | integer | Optional | Unix timestamp (seconds) when the mute ends |
await setu.execute({
userId: "user_1",
action: "datadog.mute_monitor",
input: {
"monitor_id": 1
},
});Query metricsreaddatadog.query_metricsQuery metric timeseries points for a Datadog metrics query over a time range given in Unix seconds.
| Input | Type | Description | |
|---|---|---|---|
query | string | Required | Metrics query, e.g. system.cpu.idle{*} |
from | integer | Required | Start of the range, Unix seconds |
to | integer | Required | End of the range, Unix seconds |
await setu.execute({
userId: "user_1",
action: "datadog.query_metrics",
input: {
"query": "<query>",
"from": 1,
"to": 1
},
});Search eventsreaddatadog.search_eventsSearch Datadog events with the event search syntax over a time range such as now-15m to now.
| Input | Type | Description | |
|---|---|---|---|
query | string | Optional | Event search query, e.g. service:web* |
from | string | Optional | Start, date math like now-15m or ms timestamp |
to | string | Optional | End, date math like now or ms timestamp |
limit | integer | Optional | Maximum events to return |
sort | string | Optional | Sort order |
await setu.execute({
userId: "user_1",
action: "datadog.search_events",
input: {},
});Search monitorsreaddatadog.search_monitorsSearch monitors by free text or facets such as status:alert or tag:env:prod, returning matching monitors with their current status.
| Input | Type | Description | |
|---|---|---|---|
query | string | Optional | Search query, e.g. status:alert or a name fragment |
page | integer | Optional | Zero-based page number |
per_page | integer | Optional | Results per page |
sort | string | Optional | Sort expression, e.g. status,asc |
await setu.execute({
userId: "user_1",
action: "datadog.search_monitors",
input: {},
});Unmute monitorwritedatadog.unmute_monitorUnmute a monitor, for one scope or for all scopes, so it notifies again.
| Input | Type | Description | |
|---|---|---|---|
monitor_id | integer | Required | Monitor id |
scope | string | Optional | Scope to unmute, e.g. host:app1 |
all_scopes | boolean | Optional | Clear muting across all scopes |
await setu.execute({
userId: "user_1",
action: "datadog.unmute_monitor",
input: {
"monitor_id": 1
},
});