Datadog Monitors
Observability
Turns "is anything on fire" into a tool call. An agent can list alerting monitors, read one in full, and pull the metric behind it — all read-only, and all under keys it never sees.
What you get
dd.monitors.list— monitors filtered by tag and current state.dd.monitor.get— one monitor's query, thresholds and per-group state.dd.metrics.query— a timeseries query over an explicit window.
What you need
- Datadog API key — an organisation key from Organization Settings → API Keys. It says which org you are.
- Datadog application key — scoped to
monitors_readandtimeseries_query. This is the key that decides what the tools can actually see, so keep the scopes narrow. - Datadog site — which region your organisation lives in. Sending EU keys to the US endpoint fails authentication rather than falling back.
- JWKS endpoint — the host where your identity provider publishes its signing keys, without a scheme.
- Token audience — the
audclaim your callers' tokens carry.
How it works
Datadog wants two credentials on every request, which is the one interesting thing about this template: they are two parts of a single credential target rather than two targets. On a managed gateway the pair is resolved together, so a rotation that replaces one and forgets the other is a single edit rather than two.
The site is a variable rather than a hardcoded host because the API base differs per region, and the failure when it is wrong looks like an authentication problem rather than a routing one.
dd.metrics.query takes an explicit from and to in unix seconds. There is no relative window, deliberately — "the last hour" resolved by the gateway would be an hour measured on a clock the caller cannot see.
Notes
Every binding is read-only. There is no mute, no downtime and no monitor edit, so an agent triaging an incident cannot silence the thing that told it there was one.
Datadog rate-limits the query API per organisation. dd.metrics.query caps the response at 2 MiB; a query broad enough to exceed that is one worth narrowing before it reaches a model.