Specific monitor to downtime (optional, omit for scope-based)
Pitfalls
:
Event
text
supports Datadog's markdown format including @mentions
Downtimes scope uses tag syntax:
host:web01
,
env:staging
Omitting
end
creates an indefinite downtime; always set an end time for maintenance
Downtime
monitor_id
narrows to a single monitor; scope applies to all matching monitors
6. Manage Hosts and Traces
When to use
User wants to list infrastructure hosts or inspect distributed traces
Tool sequence
:
DATADOG_LIST_HOSTS
- List all reporting hosts [Required]
DATADOG_GET_TRACE_BY_ID
- Get a specific distributed trace [Optional]
Key parameters
:
filter
Host search filter string
sort_field
Sort hosts by field (e.g., 'name', 'apps', 'cpu')
sort_dir
Sort direction ('asc' or 'desc')
trace_id
Distributed trace ID for trace lookup
Pitfalls
:
Host list includes all hosts reporting to Datadog within the retention window
Trace IDs are long numeric strings; ensure exact match
Hosts that stop reporting are retained for a configured period before removal
Common Patterns
Monitor Query Syntax
Metric alerts
:
avg(last_5m):avg:system.cpu.user{env:prod} > 90
Log alerts
:
logs("service:web status:error").index("main").rollup("count").last("5m") > 10
Tag Filtering
Tags use
key:value
format:
host:web01
,
env:prod
,
service:api
Multiple tags:
{host:web01,env:prod}
(AND logic)
Wildcard:
host:web*
Pagination
Use
page
and
page_size
or offset-based pagination depending on endpoint
Check response for total count to determine if more pages exist
Continue until all results are retrieved
Known Pitfalls
Timestamps
:
Most endpoints use Unix epoch seconds (not milliseconds)
Some endpoints accept ISO 8601; check tool schema
Time ranges should be reasonable (not years of data)
Query Syntax
:
Metric queries:
aggregation:metric{tags}
Log queries:
field:value
pairs
Monitor queries vary by type; check Datadog documentation
Rate Limits
:
Datadog API has per-endpoint rate limits
Implement backoff on 429 responses
Batch operations where possible
Quick Reference
Task
Tool Slug
Key Params
Query metrics
DATADOG_QUERY_METRICS
query, from, to
List metrics
DATADOG_LIST_METRICS
q
Search logs
DATADOG_SEARCH_LOGS
query, from, to, limit
List log indexes
DATADOG_LIST_LOG_INDEXES
(none)
List monitors
DATADOG_LIST_MONITORS
tags
Get monitor
DATADOG_GET_MONITOR
monitor_id
Create monitor
DATADOG_CREATE_MONITOR
name, type, query, message
Update monitor
DATADOG_UPDATE_MONITOR
monitor_id
Mute monitor
DATADOG_MUTE_MONITOR
monitor_id
Unmute monitor
DATADOG_UNMUTE_MONITOR
monitor_id
List dashboards
DATADOG_LIST_DASHBOARDS
(none)
Get dashboard
DATADOG_GET_DASHBOARD
dashboard_id
Update dashboard
DATADOG_UPDATE_DASHBOARD
dashboard_id, title, widgets
Delete dashboard
DATADOG_DELETE_DASHBOARD
dashboard_id
List events
DATADOG_LIST_EVENTS
start, end
Create event
DATADOG_CREATE_EVENT
title, text, alert_type
Create downtime
DATADOG_CREATE_DOWNTIME
scope, start, end
List hosts
DATADOG_LIST_HOSTS
filter, sort_field
Get trace
DATADOG_GET_TRACE_BY_ID
trace_id
When to Use
This skill is applicable to execute the workflow or actions described in the overview.