xiaohongshu
xiaohongshu
datadog
Query logs, metrics, monitors, and dashboards from Datadog. Search logs, check alert status, and investigate incidents.
Full skill instructions
This skill provides access to Datadog for monitoring, logging, and alerting via the Datadog API.
You need to set up API credentials:
Set these as environment variables (add to your shell profile or .env):
export DD_API_KEY="your-api-key"
export DD_APP_KEY="your-application-key"
export DD_SITE="us3.datadoghq.com" # Your Datadog site (from browser history: us3)
Use this skill when the user:
Base URL: https://api.$(printenv DD_SITE)/api/v1 or v2
Search Logs (POST /api/v2/logs/events/search):
curl -s -X POST "https://api.$(printenv DD_SITE)/api/v2/logs/events/search" \
-H "DD-API-KEY: $(printenv DD_API_KEY)" \
-H "DD-APPLICATION-KEY: $(printenv DD_APP_KEY)" \
-H "Content-Type: application/json" \
-d '{
"filter": {
"query": "service:my-service status:error",
"from": "now-1h",
"to": "now"
},
"sort": "-timestamp",
"page": {"limit": 50}
}'
Common log query filters:
service:name - Filter by servicestatus:error - Filter by log level (error, warn, info, debug)@http.status_code:500 - Filter by HTTP statushost:hostname - Filter by hostenv:production - Filter by environmentList All Monitors (GET /api/v1/monitor):
curl -s "https://api.$(printenv DD_SITE)/api/v1/monitor" \
-H "DD-API-KEY: $(printenv DD_API_KEY)" \
-H "DD-APPLICATION-KEY: $(printenv DD_APP_KEY)"
Get Monitor by ID (GET /api/v1/monitor/{id}):
curl -s "https://api.$(printenv DD_SITE)/api/v1/monitor/{MONITOR_ID}" \
-H "DD-API-KEY: $(printenv DD_API_KEY)" \
-H "DD-APPLICATION-KEY: $(printenv DD_APP_KEY)"
Search Monitors:
curl -s "https://api.$(printenv DD_SITE)/api/v1/monitor?query=status:Alert" \
-H "DD-API-KEY: $(printenv DD_API_KEY)" \
-H "DD-APPLICATION-KEY: $(printenv DD_APP_KEY)"
Query Metrics (GET /api/v1/query):
curl -s -G "https://api.$(printenv DD_SITE)/api/v1/query" \
--data-urlencode "query=avg:system.cpu.user{*}" \
--data-urlencode "from=$(date -v-1H +%s)" \
--data-urlencode "to=$(date +%s)" \
-H "DD-API-KEY: $(printenv DD_API_KEY)" \
-H "DD-APPLICATION-KEY: $(printenv DD_APP_KEY)"
List Available Metrics (GET /api/v1/metrics):
curl -s "https://api.$(printenv DD_SITE)/api/v1/metrics?from=$(date -v-1d +%s)" \
-H "DD-API-KEY: $(printenv DD_API_KEY)" \
-H "DD-APPLICATION-KEY: $(printenv DD_APP_KEY)"
Query Events (GET /api/v1/events):
curl -s "https://api.$(printenv DD_SITE)/api/v1/events?start=$(date -v-1d +%s)&end=$(date +%s)" \
-H "DD-API-KEY: $(printenv DD_API_KEY)" \
-H "DD-APPLICATION-KEY: $(printenv DD_APP_KEY)"
List Dashboards (GET /api/v1/dashboard):
curl -s "https://api.$(printenv DD_SITE)/api/v1/dashboard" \
-H "DD-API-KEY: $(printenv DD_API_KEY)" \
-H "DD-APPLICATION-KEY: $(printenv DD_APP_KEY)"
List Incidents (GET /api/v2/incidents):
curl -s "https://api.$(printenv DD_SITE)/api/v2/incidents" \
-H "DD-API-KEY: $(printenv DD_API_KEY)" \
-H "DD-APPLICATION-KEY: $(printenv DD_APP_KEY)"
# Search for error logs in the last hour
curl -s -X POST "https://api.$(printenv DD_SITE)/api/v2/logs/events/search" \
-H "DD-API-KEY: $(printenv DD_API_KEY)" \
-H "DD-APPLICATION-KEY: $(printenv DD_APP_KEY)" \
-H "Content-Type: application/json" \
-d '{
"filter": {
"query": "status:error",
"from": "now-1h",
"to": "now"
},
"page": {"limit": 25}
}' | jq '.data[] | {timestamp: .attributes.timestamp, message: .attributes.message, service: .attributes.service}'
# List monitors that are currently alerting
curl -s "https://api.$(printenv DD_SITE)/api/v1/monitor?query=status:Alert" \
-H "DD-API-KEY: $(printenv DD_API_KEY)" \
-H "DD-APPLICATION-KEY: $(printenv DD_APP_KEY)" | jq '.[] | {name, overall_state, message}'
# Get logs for a specific service
curl -s -X POST "https://api.$(printenv DD_SITE)/api/v2/logs/events/search" \
-H "DD-API-KEY: $(printenv DD_API_KEY)" \
-H "DD-APPLICATION-KEY: $(printenv DD_APP_KEY)" \
-H "Content-Type: application/json" \
-d '{
"filter": {
"query": "service:SERVICE_NAME",
"from": "now-30m",
"to": "now"
},
"page": {"limit": 100}
}'
Datadog uses a powerful query syntax for logs:
| Operator | Example | Description |
|---|---|---|
| AND | service:api status:error | Both conditions (implicit) |
| OR | status:error OR status:warn | Either condition |
| NOT | -status:debug | Exclude matches |
| Wildcard | service:api-* | Pattern matching |
| Range | @duration:>1000 | Numeric comparisons |
| Exists | @http.url:* | Field exists |
For the from and to parameters:
now - Current timenow-1h - 1 hour agonow-1d - 1 day agonow-7d - 1 week agous3.datadoghq.com based on browser historyjq to parse JSON responsesxiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience