datadog
Skill3.3k starsChanged 8 months agoMITView on GitHub
Use when the user says "check Datadog", "查 Datadog", "查日志", "check logs", "crash logs", "查 crash", "gateway crash", "查告警", "check alerts", "check metrics", or needs to investigate production issues via Datadog Logs API.
- Reads credentials
6 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- speakeasy-api/gramtheir own version, first seen Oct 1, 2026
- fworks-tech/agenthoodedited, first seen Sep 28, 2026
- jalbarrang/skillstheir own version, first seen Aug 23, 2026
- greedychipmunk/agent-skillstheir own version, first seen May 25, 2026
- getsentry/juniortheir own version, first seen Apr 5, 2026
- alanalvestech/hitanktheir own version, first seen Mar 5, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- fworks-tech/agenthood★ 312% same
Wrote their own version · 5
- getsentry/junior★ 365same name
- speakeasy-api/gram★ 271same name
- alanalvestech/hitank★ 38same name
- greedychipmunk/agent-skills★ 19same name
- jalbarrang/skills★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- process-pr-reviewsSkill
- nexu-e2e-testSkill
- sync-specsSkill
- feedbackSkill
- nano-bananaSkill
- static-deploySkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
All requests go to https://api.datadoghq.com/api/v2/logs/events/search.
- Very specific: line 133
Add pod_name:<name> to the query:
- Distinctive: line 154
Use python3 inline to extract key fields:
- Distinctive: line 197
When investigating a crash:
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Datadog Log Investigation
Query Datadog Logs API to investigate production issues for the Nexu platform.
Authentication
Before making any Datadog API call, you MUST ask the user for these two keys:
DD_API_KEY— Datadog API Key (Organization Settings → API Keys)DD_APP_KEY— Datadog Application Key (Organization Settings → Application Keys, requireslogs_read_datascope)
Store them in shell variables for the session. Never hardcode or commit them.
Site: datadoghq.com (US)
API Base
All requests go to https://api.datadoghq.com/api/v2/logs/events/search.
Headers:
DD-API-KEY: <api_key>
DD-APPLICATION-KEY: <app_key>
Content-Type: application/jsonCommon Queries
OpenClaw Crash Events
curl -s "https://api.datadoghq.com/api/v2/logs/events/search" \
-H "DD-API-KEY: $DD_API_KEY" \
-H "DD-APPLICATION-KEY: $DD_APP_KEY" \
-H "Content-Type: application/json" \
-d '{
"filter": {
"query": "service:nexu-gateway @event:openclaw_crash",
"from": "now-1h",
"to": "now"
},
"sort": "-timestamp",
"page": {"limit": 20}
}'Key fields in results:
attributes.attributes.exitCode— process exit code (1 = fatal error, null = signal)attributes.attributes.signal— kill signal (SIGKILL, SIGTERM, etc.)attributes.tags→pod_name,image_tag— which pod and which version
OpenClaw stderr Output (Crash Details)
curl -s "https://api.datadoghq.com/api/v2/logs/events/search" \
-H "DD-API-KEY: $DD_API_KEY" \
-H "DD-APPLICATION-KEY: $DD_APP_KEY" \
-H "Content-Type: application/json" \
-d '{
"filter": {
"query": "service:nexu-gateway @stream:stderr",
"from": "now-1h",
"to": "now"
},
"sort": "-timestamp",
"page": {"limit": 50}
}'This shows the actual error output from the OpenClaw process (e.g., invalid_auth, EADDRINUSE, config validation failures).
Gateway Startup / Recovery Events
curl -s "https://api.datadoghq.com/api/v2/logs/events/search" \
-H "DD-API-KEY: $DD_API_KEY" \
-H "DD-APPLICATION-KEY: $DD_APP_KEY" \
-H "Content-Type: application/json" \
-d '{
"filter": {
"query": "service:nexu-gateway (\"starting gateway\" OR \"gateway is ready\" OR \"spawned openclaw\")",
"from": "now-1h",
"to": "now"
},
"sort": "timestamp",
"page": {"limit": 30}
}'Slack Token Health Check
curl -s "https://api.datadoghq.com/api/v2/logs/events/search" \
-H "DD-API-KEY: $DD_API_KEY" \
-H "DD-APPLICATION-KEY: $DD_APP_KEY" \
-H "Content-Type: application/json" \
-d '{
"filter": {
"query": "service:nexu-api slack_token_health*",
"from": "now-1h",
"to": "now"
},
"sort": "-timestamp",
"page": {"limit": 20}
}'API HTTP Request Logs
curl -s "https://api.datadoghq.com/api/v2/logs/events/search" \
-H "DD-API-KEY: $DD_API_KEY" \
-H "DD-APPLICATION-KEY: $DD_APP_KEY" \
-H "Content-Type: application/json" \
-d '{
"filter": {
"query": "service:nexu-api http_request @attributes.status:>=500",
"from": "now-1h",
"to": "now"
},
"sort": "-timestamp",
"page": {"limit": 20}
}'Filter by Pod
Add pod_name:<name> to the query:
service:nexu-gateway pod_name:nexu-gateway-1 @event:openclaw_crashFilter by Time Window
Use ISO 8601 timestamps:
{
"from": "2026-03-10T05:00:00Z",
"to": "2026-03-10T06:00:00Z"
}Or relative: "now-30m", "now-1h", "now-24h".
Parsing Results
Use python3 inline to extract key fields:
curl -s ... | python3 -c "
import json, sys
data = json.load(sys.stdin)
events = data.get('data', [])
print(f'Total events: {len(events)}')
for e in events:
attrs = e['attributes']['attributes']
tags = e['attributes']['tags']
pod = next((t.split(':',1)[1] for t in tags if t.startswith('pod_name:')), '?')
ts = attrs.get('time', '?')
msg = e['attributes'].get('message', '')[:120]
print(f'{ts} | pod={pod} | {msg}')
"Services and Events Reference
| Service | Description |
nexu-gateway | Gateway sidecar (manages OpenClaw process) |
nexu-api | API server |
| Event | Meaning |
openclaw_crash | OpenClaw process exited unexpectedly |
openclaw_restart_scheduled | Sidecar scheduling a restart |
openclaw_restart_limit | Max restart attempts exceeded |
openclaw_orphan_killed | Killed zombie OpenClaw process |
slack_token_health_check_invalidated | Invalid Slack tokens detected and marked |
Tag Reference
| Tag | Example |
pod_name | nexu-gateway-1, nexu-gateway-2 |
image_tag | sha-55f13372bb72abc7db1538cca3db2bcda0d35eba |
kube_stateful_set | nexu-gateway |
Investigation Playbook
When investigating a crash:
- Check crash events — get exit codes, signals, timestamps, affected pods
- Check stderr — get the actual error message from OpenClaw
- Check startup events — correlate crash with deploy times (
image_tagchanges) - Check token health — if
invalid_auth, look forslack_token_health_check_invalidated - Check API logs — if API errors are contributing
Rules
- Never hardcode API keys in skill files or logs — always use variables
- Default time window — start with
now-1h, expand tonow-24hif needed - Always parse and summarize — don't dump raw JSON to the user
- Correlate across services — crashes often involve both gateway and API logs
- Check image_tag to determine if crashes are related to a specific deployment
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

