datadog-logs
What it does
This skill helps an AI agent query Datadog logs and summarize what it finds. It is for engineers who need to investigate errors or slowdowns without clicking through the Datadog screens.
When to use it
- ✓When an error rate jumps and you want the agent to find the matching log lines.
- ✓When you need to compare log volume across services or environments after a deploy.
- ✓When you want a daily digest of what went wrong overnight.
Skill link
https://github.com/composio-community/awesome-codex-skills/blob/master/datadog-logs/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Can you check Datadog for checkout errors in production over the last 15 minutes and group them by endpoint?”
5 new skills a week. 1 minute to read.
How it works
The agent runs log searches and counts through the Composio tool, using filters for service, status and time range. It returns the results as structured data it can summarize.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Datadog Logs
Query Datadog logs through the Composio CLI so the agent can filter, pivot, and summarize without you pasting screenshots.
When to Use
- Investigating a spike, error surge, or latency regression and you want structured JSON back.
- Correlating a deploy with log volume changes across services/environments.
- Building a scheduled "what broke overnight" digest.
Prereqs
curl -fsSL https://composio.dev/install | bash
composio login
composio link datadog # prompts for site + API/APP keys
Discover Tools
composio search "search logs" --toolkits datadog
composio search "aggregate logs" --toolkits datadog
composio tools list datadog
Commonly used slugs (confirm with --get-schema):
DATADOG_SEARCH_LOGSDATADOG_AGGREGATE_LOGSDATADOG_LIST_ACTIVE_METRICSDATADOG_GET_EVENT
Filter Recipes
Errors from one service in the last 15 minutes
composio execute DATADOG_SEARCH_LOGS -d '{
"filter": {
"query": "service:checkout status:error env:prod",
"from": "now-15m",
"to": "now"
},
"page": { "limit": 100 },
"sort": "-timestamp"
}'
Aggregate error count by endpoint
composio execute DATADOG_AGGREGATE_LOGS -d '{
"filter": { "query": "service:checkout status:error", "from": "now-1h", "to": "now" },
"group_by": [{ "facet": "@http.url_path", "limit": 20 }],
"compute": [{ "aggregation": "count" }]
}'
Trace a single request across services
composio execute DATADOG_SEARCH_LOGS -d '{
"filter": { "query": "@trace_id:7f3a2b1c env:prod", "from": "now-1h", "to": "now" },
"sort": "timestamp"
}'
Save a reusable query
composio search "save log view" --toolkits datadog
composio execute DATADOG_CREATE_SAVED_VIEW -d '{
"name": "checkout-errors-prod",
"query": "service:checkout status:error env:prod"
}'
Pipe into Local Analysis
Datadog output is JSON on stdout — pipe to jq for quick summaries:
composio execute DATADOG_SEARCH_LOGS -d '{
"filter": {"query":"service:api status:error","from":"now-30m","to":"now"},
"page":{"limit":500}
}' | jq -r '.data[].attributes.message' | sort | uniq -c | sort -rn | head
Multi-Step Workflow
Save as scripts/dd-incident.ts, then composio run --file scripts/dd-incident.ts -- --service checkout:
const svc = process.argv[process.argv.indexOf("--service") + 1];
const errors = await execute("DATADOG_SEARCH_LOGS", {
filter: { query: `service:${svc} status:error`, from: "now-1h", to: "now" },
page: { limit: 200 }, sort: "-timestamp"
});
const topPaths = await execute("DATADOG_AGGREGATE_LOGS", {
filter: { query: `service:${svc} status:error`, from: "now-1h", to: "now" },
group_by: [{ facet: "@http.url_path", limit: 10 }],
compute: [{ aggregation: "count" }]
});
console.log(JSON.stringify({ svc, sample: errors.data?.slice(0,5), topPaths }, null, 2));
Schedule a Daily Digest
Use cron (or composio dev listen for triggers) to run the workflow and forward results to Slack:
composio run --file scripts/dd-incident.ts -- --service checkout \
| tee /tmp/digest.json
composio execute SLACK_SEND_MESSAGE -d "$(jq -n \
--slurpfile d /tmp/digest.json \
'{channel:"oncall", text: ($d[0] | tojson)}')"
Troubleshooting
- Empty results → confirm
env:andservice:tags; Datadog indexes are region-scoped — set the right site duringcomposio link datadog. 403 Forbidden→ the APP key lackslogs_read; regenerate with scope and re-link.- Slow queries → narrow
from/to, add afacetfilter, or useDATADOG_AGGREGATE_LOGSinstead of pulling raw events. - Unknown facet →
composio search "list log facets" --toolkits datadog.
Full CLI reference: docs.composio.dev/docs/cli
FAQ
What do I need to connect Datadog?
You link Datadog through the Composio tool, which asks for your site and API keys.
Can the agent group errors by a field?
Yes. The skill includes an aggregation search that counts errors by a chosen field, such as the endpoint.
Does this change anything in Datadog?
No. The recipes shown are for searching and reading logs.
Details
Original description by the author
Query and filter Datadog logs from the shell using the Composio CLI. Run scoped log searches, pivot across services/environments, and export structured JSON for downstream agents instead of click-driving the Datadog UI.
Popularity
- GitHub stars
- 17k
- Ranking position
- #10750
- License
- —
- Updated
- 7/25/2026
Comments
- …
More skills from this repository
agent-deep-links
17kHelps your agent make clickable links that open a thread, file, folder or setting directly in an app like Codex or Cursor.
brand-guidelines
17kHelps your agent style an artifact with OpenAI-style brand colors and fonts so it matches the Codex look and feel.
codebase-migrate
17kHelps your agent plan and run large code migrations across hundreds of files, such as framework upgrades or API renames.
connect-apps
17kLets your agent take real actions in apps like Gmail, Slack and GitHub, such as sending an email or creating an issue.
Similar skills
openclaw-update
394kHelps your agent update an existing OpenClaw Gateway, choosing the update method that fits how it was installed and keeping your session working.
diagnose-gateway
394kHelps your agent find out why your OpenClaw Gateway is failing by checking settings, channels, and ports without changing anything.
crabbox-apps
394kHelps your agent open and run an app on a temporary cloud machine, then show its view in your chat side panel.