monitoring
Datadog CLI for Coding Agents
Use the Datadog CLI for coding agents with headless JSON commands, schema discovery, credentials, and permission controls.
10 functions 6 read 4 write API key auth
Datadog CLI for Coding Agents
Let coding agents discover schemas and execute integration functions through CLI commands or MCP.
Use this pattern when another coding agent needs exact commands and schema discovery. The Datadog CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Datadog CLI for Coding Agents
kosmokrator integrations:configure datadog --set api_key="$DATADOG_API_KEY" --set app_key="$DATADOG_APP_KEY" --enable --read allow --write ask --json
kosmo integrations:call datadog.datadog_list_monitors '{"name":"example_name","tags":"example_tags","page":1,"page_size":1}' --json Discovery Before Execution
Agents and scripts can inspect Datadog docs and schemas before choosing a function.
kosmo integrations:docs datadog --json
kosmo integrations:docs datadog.datadog_list_monitors --json
kosmo integrations:schema datadog.datadog_list_monitors --json
kosmo integrations:search "Datadog" --json
kosmo integrations:list --json Useful Datadog CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
datadog.datadog_list_monitors | Read | name, tags, page, page_size | List Datadog monitors. Optionally filter by name or tags. Returns monitor IDs, names, types, states, and query definitions. |
datadog.datadog_get_monitor | Read | monitor_id | Get full details of a specific Datadog monitor by ID. Returns the monitor query, thresholds, message, and current state. |
datadog.datadog_create_monitor | Write | type, query, name, message, priority, options, tags | Create a new Datadog monitor. Specify the monitor type, query, name, and optional message and thresholds. Common types: "metric alert", "service check", "event alert". |
datadog.datadog_update_monitor | Write | monitor_id, type, query, name, message, priority, options, tags | Update an existing Datadog monitor. Provide the monitor ID and the fields to update (name, query, message, options, tags, etc.). |
datadog.datadog_delete_monitor | Write | monitor_id | Delete a Datadog monitor by ID. This action is permanent and cannot be undone. |
datadog.datadog_query_metrics | Read | from, to, query | Query Datadog metrics between two timestamps. Use Datadog query syntax (e.g., "avg:system.cpu.user{env:production} by {host}"). Returns time series data points. |
datadog.datadog_list_dashboards | Read | none | List all Datadog dashboards. Returns dashboard IDs, titles, descriptions, and modification dates. |
datadog.datadog_get_dashboard | Read | dashboard_id | Get full details of a specific Datadog dashboard by ID. Returns the dashboard layout, widgets, and template variables. |
datadog.datadog_post_event | Write | title, text, priority, tags, alert_type, date_happened, source_type_name, host, aggregation_key | Post an event to the Datadog event stream. Specify title, text, priority, tags, and alert type. Events appear in the event timeline. |
datadog.datadog_get_current_user | Read | none | Get the currently authenticated Datadog user. Useful for verifying credentials and identifying the connected account. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.