datadog_metrics_query
Execute a Datadog metrics timeseries query by providing a query and start time. Returns actual data points for the specified time window.
Instructions
Execute a point-in-time Datadog metrics timeseries query (e.g. avg:system.cpu.user{*} over the last 1h). Returns the actual data points; use datadog_metrics_catalog_list instead when you only need to discover metric names. Read-only. Mirrors omni-dev datadog metrics query. Returns YAML matching the CLI -o yaml output (status, from_date, to_date, series).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | End of the query window. Defaults to `now` when omitted. | |
| from | Yes | Start of the query window. Accepts relative shorthand (`15m`, `1h`, `7d`), the literal `now`, an RFC 3339 timestamp with timezone, or Unix epoch seconds. | |
| query | Yes | Datadog metrics query string, e.g. `avg:system.cpu.user{*}` or `sum:trace.http.request.hits{service:api}.as_rate()`. Required. |