Connect Datadog to Toolspoke
Search logs, query metrics, and triage monitors, incidents, and hosts. Toolspoke gives your agents 14 of its actions, and you decide which ones each project allows.
- Connection
- Provider REST API
- Authentication
- API and application keys
- Actions exposed
- 14
- What a call bills
- Nothing
- Adapter
- Maintained by Toolspoke
- Category
- Observability
Connected in three steps
Install Datadog
Open the marketplace in your workspace, add Datadog to the project your agents work in, and it appears on the gateway immediately.
Connect the credential
Provide the credential Datadog asks for. Where to get it, and what it has to be able to reach, is the next section.
Give it to an agent
Describe the job in one sentence and the builder proposes the instructions, the toolkits it needs, a schedule and where it should answer, or start from a catalogue agent. It can use every Datadog action the project leaves on.
Where the agent answers
Slack
Ask it in a channel or a thread, and it replies in the thread it was asked in.
Email
Email it. Each write waits for a person's go-ahead unless that action is allowed in advance.
GitHub
Mention it on a pull request, and it answers there.
Schedule
A routine wakes it on a schedule, or when a new item matches.
Any agent in the project can use Datadog, and only the actions the project leaves on.
What Datadog asks for
API and application keys. You provide it once, when you install the connector. Toolspoke encrypts it at rest and decrypts it only for the length of a single call, and the gateway attaches it to the outbound request itself, so it is never part of the arguments an agent sends.
- API keyRequired
- Datadog → Organization Settings → API Keys. Sent as the DD-API-KEY header.
- …
- Application keyRequired
- Datadog → Organization Settings → Application Keys. Sent as DD-APPLICATION-KEY. Reads inherit the scopes of the key, so give it at least monitors_read, dashboards_read, incident_read and logs_read_data.
- …
- Site API URLOptional
- The API host for your Datadog site: https://api.datadoghq.com (US1), https://api.datadoghq.eu (EU1), https://api.us3.datadoghq.com, https://api.us5.datadoghq.com, https://api.ap1.datadoghq.com. Keys are not valid across sites.
- https://api.datadoghq.com
What an agent can do in Datadog
14 actions, each one declared by name in the connector. A workspace policy grants a person all of them, a hand-picked selection, everything on the read side, everything on the write side, or none.
12 read, 1 write, 1 destructive
Reads
12Fetches data and changes nothing.
search_logsReturn individual log events matching a Datadog log search query, newest first. Use this when you need the actual lines around an incident; use aggregate_logs when you want counts, rates or a breakdown instead, because a raw search of a noisy service will fill a context window without answering the question. Time bounds accept Datadog's relative syntax (now-15m, now-1h) as well as ISO 8601.
aggregate_logsCount or measure logs instead of listing them, optionally broken down by a facet. This is the right first call for "how many errors, by service, in the last hour", it returns a handful of buckets rather than thousands of lines. Follow up with search_logs on the worst bucket to read the actual events.
query_timeseriesEvaluate a Datadog metric query over a time window and return the points. The query uses Datadog's own syntax, e.g. "avg:system.cpu.user{env:prod} by {host}" or "sum:trace.http.request.errors{service:checkout}.as_rate()". Call list_metrics first if you do not know the exact metric name. Timestamps are epoch milliseconds.
list_metricsList the metric names that have reported since a point in time, so query_timeseries can be given a name that actually exists. `from` is epoch SECONDS, not milliseconds, and is required by Datadog, pass the start of the period you care about.
list_monitorsList monitors with their current alert state, which is the fastest way to see what is alerting right now. Returns the numeric monitor ids that get_monitor, mute_monitor and unmute_monitor need. Filter with name for a substring of the monitor title, or tags for the scope a monitor watches.
get_monitorFetch one monitor by its numeric id: its query, thresholds, notification message, current state and per-group states. Call list_monitors first to find the id. Use this before muting anything, so the mute is applied to the monitor you meant.
list_eventsSearch the Datadog event stream, deploys, monitor transitions, integration events and anything posted through the events intake. Use it to line an alert up against a deployment. Reverse it with a query like "source:github" or "tags:service:checkout". Time bounds accept Datadog's relative syntax.
list_incidentsList Datadog incidents newest first, with their state, severity and commander. Use it to see what is currently declared before deciding whether an alert is already being handled, then pass an id to get_incident. Requires the Incident Management product and an application key with incident_read.
get_incidentFetch one incident by its UUID: title, state, severity, timeline fields, and the users attached to it. Call list_incidents first for the id. Pass include to pull related records back in the same call rather than making a second one.
list_dashboardsList dashboards with their ids, titles and authors. Use it to find the dashboard id that get_dashboard needs; the widget definitions are not included here.
get_dashboardFetch one dashboard by id, including its widget definitions and the metric queries behind them. This is the quickest way to learn which queries a team already trusts for a service, read the widgets, then re-run one through query_timeseries. Deeply nested widget groups are trimmed.
list_hostsList hosts reporting to Datadog with their tags, apps and mute status. Hosts seen in the last three hours are returned by default; pass `from` as epoch seconds to widen that. Use it to confirm whether a host stopped reporting at all, which no metric query can tell you.
Writes
1Creates or updates something on the other side.
unmute_monitorRestore notifications for a monitor that mute_monitor silenced. Pass the same scope that was muted to lift one scope; omit it to clear the monitor's mute entirely.
Destructive
1Deletes or permanently alters something. Worth granting on purpose.
mute_monitorSilence a monitor so it stops notifying, optionally only for one scope and only until a given time. This changes what the on-call rota sees: while a monitor is muted nobody is paged for it, so always set `end` unless a human has asked for an open-ended mute. Reverse it with unmute_monitor.
What it will not do
The gateway enforces each of these, so they can be stated flatly.
- It cannot call anything else
- The 14 actions above are the whole of it. A call to any other name is refused before it reaches Datadog rather than forwarded on, and connecting your account does not add to the list: it is fixed by the connector, not discovered at run time.
- It reaches no further than your credential
- Toolspoke holds no access to Datadog of its own. Every call carries the credential you stored and nothing besides, so whatever that credential cannot reach, this connector cannot reach either.
- It never hears from Datadog
- Nothing is pushed to it. There is no webhook, no subscription and no polling, so this connector cannot notice by itself that something changed in Datadog. An agent has to ask.
- It does not smooth over provider limits
- Toolspoke does not retry, queue or back off around Datadog's own rate limits. A call that Datadog refuses comes back to the agent as a failed call.
Before you connect it
What can an agent do in Datadog?
14 named actions: 12 that only read, 1 that write and 1 that delete or permanently alter something. They include search_logs, aggregate_logs and query_timeseries. Nothing outside that list is reachable: the connector declares each operation by name rather than proxying whatever an agent asks for.
What credentials does the Datadog connector need?
API and application keys. The connector asks for api key and application key, and optionally site api url. Values are encrypted at rest and attached to the outbound request by the gateway, so they are never part of the arguments an agent sends and never reach the audit log.
How does an agent get to use Datadog?
Install Datadog in a project and every agent in that project can use the actions the project leaves on. Describe a job in one sentence and the builder proposes the instructions, the toolkits it needs, a schedule and where it should answer, or start from a catalogue agent. The agent answers when someone asks it in Slack, emails it or mentions it on a GitHub pull request, or when its routine wakes it.
What does the Datadog connector not do?
The 14 actions above are the whole of it. A call to any other name is refused before it reaches Datadog rather than forwarded on, and connecting your account does not add to the list: it is fixed by the connector, not discovered at run time. Toolspoke holds no access to Datadog of its own. Every call carries the credential you stored and nothing besides, so whatever that credential cannot reach, this connector cannot reach either. Nothing is pushed to it. There is no webhook, no subscription and no polling, so this connector cannot notice by itself that something changed in Datadog. An agent has to ask. Toolspoke does not retry, queue or back off around Datadog's own rate limits. A call that Datadog refuses comes back to the agent as a failed call.
Can I limit which actions an agent can call?
Yes, in two places. The project switches Datadog's actions on and off one at a time, for everyone in the project at once, and the screen groups them by read, write and destructive so turning off everything that deletes is one click. An individual agent key can then be narrowed further, to particular toolkits in a project and to particular actions in a toolkit. Whatever it was granted, a key never reaches a project its owner cannot.
What gets recorded when an agent calls Datadog?
Every attempt, with the agent that made it and the person that agent belongs to, the full request payload, the response payload, the status, the duration, and what the call cost in sandbox time and model tokens. Values whose key names a secret are masked out before the record is shown to anyone. An operation the connector marks as not retained never has its response body written at all, so the gateway keeps no second copy of what was read.