Stats
Actions
Tags
How this command is triggered — by the user, by Claude, or both
Slash command
/datadog-observability:dd-queryThe summary Claude sees in its command listing — used to decide when to auto-load this command
# Datadog Metrics Query Run a Datadog metrics query. ## Instructions 1. Verify environment variables: 2. Take the user's metrics query (provided as the argument to this command). If no query is provided, ask the user what metric they want to query. 3. Execute the query: 4. Present the results in a clean, readable format (table or summary). Don't dump raw JSON unless the user asks for it.
Run a Datadog metrics query.
test -n "$DD_API_KEY" && test -n "$DD_APP_KEY" && echo "OK" || echo "MISSING: set DD_API_KEY and DD_APP_KEY"
Take the user's metrics query (provided as the argument to this command). If no query is provided, ask the user what metric they want to query.
Execute the query:
curl -s -G "https://api.${DD_SITE:-datadoghq.com}/api/v1/query" \
-H "DD-API-KEY: $DD_API_KEY" \
-H "DD-APPLICATION-KEY: $DD_APP_KEY" \
--data-urlencode "query=USER_METRICS_QUERY_HERE" \
--data-urlencode "from=$(date -v-1H +%s)" \
--data-urlencode "to=$(date +%s)" \
| python3 -m json.tool
npx claudepluginhub ivlad003/plugins --plugin datadog-observability