Labsco
DataDog logo

dd-pup

โ˜… 940

by datadog-labs ยท part of DataDog/pup

Datadog CLI (pup). OAuth2 auth with token refresh.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeAdvanced setup
๐Ÿงฐ Not standalone. This skill ships with DataDog/pup and only works together with that tool โ€” install the tool first, then add this skill.

Datadog CLI (pup). OAuth2 auth with token refresh.

Inspect the full instructions your agent will receiveExpand

This is the exact playbook injected into your agent when the skill activates โ€” shown here so you can audit it before installing. You don't need to read it to use the skill.

by datadog-labs

Datadog CLI (pup). OAuth2 auth with token refresh. npx skills add https://github.com/datadog-labs/pup --skill dd-pup Download ZIPGitHub940

pup (Datadog CLI)

Pup CLI for Datadog API operations. Supports OAuth2 and API key auth.

Quick Reference

Task Command Search error logs pup logs search --query "status:error" --from 1h List monitors pup monitors list Create downtime pup downtime create --file downtime.json Find slow traces pup traces search --query="@duration:>500000000" --from="1h" List incidents pup incidents list Query metrics pup metrics query --query "avg:system.cpu.user{*}" List hosts pup infrastructure hosts list Check SLOs pup slos list On-call teams pup on-call teams list Security signals pup security signals list --query "*" --from 24h Inspect runtime values pup debugger probes create --service my-svc --env prod --probe-location "com.example.MyClass:myMethod" or "com.example.MyClass:myMethod(String, int)" Find probe-able methods pup symdb search --service my-svc --query MyController --view probe-locations Check auth pup auth status Refresh token pup auth refresh

Auth

Copy & paste โ€” that's it
pup auth login # OAuth2 browser flow (recommended)
pup auth status # Check token validity
pup auth refresh # Refresh expired token (no browser)
pup auth logout # Clear credentials

โš ๏ธ Tokens expire (~1 hour). If a command fails with 401/403 mid-conversation:

Copy & paste โ€” that's it
pup auth refresh # Try refresh first
pup auth login # If refresh fails, full re-auth

Headless/CI (no browser)

Copy & paste โ€” that's it
# Use env vars or:
export DD_API_KEY=your-api-key
export DD_APP_KEY=your-app-key
export DD_SITE=datadoghq.com # or datadoghq.eu, etc.

Command Reference

Monitors

Copy & paste โ€” that's it
pup monitors list --limit 10
pup monitors list --tags "env:prod"
pup monitors get 12345
pup monitors search --query "High CPU"
pup monitors create --file monitor.json
pup monitors update 12345 --file monitor.json
pup monitors delete 12345

Logs

Copy & paste โ€” that's it
pup logs search --query "status:error" --from 1h
pup logs search --query "service:payment-api" --from 1h --limit 100
pup logs search --query "@http.status_code:5*" --from 24h
pup logs aggregate --query "service:api" --compute count --from 1h

Metrics

Copy & paste โ€” that's it
pup metrics query --query "avg:system.cpu.user{*}" --from 1h
pup metrics query --query "sum:trace.express.request.hits{service:api}" --from 1h
pup metrics list --filter "system.*"

APM / Services

Copy & paste โ€” that's it
pup apm services list --env production
pup apm services stats --env production
pup apm services operations --env production --service my-service
pup apm services resources --env production --service my-service --name http.request
pup apm dependencies list --env production

Traces

Copy & paste โ€” that's it
# Search traces (duration in nanoseconds: 1s = 1000000000)
pup traces search --query="service:api-gateway" --from="1h"
pup traces search --query="service:api @duration:>1000000000" --from="1h"
pup traces search --query="service:api status:error" --from="1h"
pup traces aggregate --query="service:api" --compute="avg(@duration)" --group-by="resource_name" --from="1h"

Incidents

Copy & paste โ€” that's it
pup incidents list
pup incidents list --limit 20
pup incidents get 

Dashboards

Copy & paste โ€” that's it
pup dashboards list
pup dashboards get abc-123
pup dashboards create --file dashboard.json
pup dashboards update abc-123 --file dashboard.json
pup dashboards delete abc-123

SLOs

Copy & paste โ€” that's it
pup slos list
pup slos get slo-123
pup slos status slo-123 --from 30d --to now
pup slos create --file slo.json

Synthetics

Copy & paste โ€” that's it
pup synthetics tests list
pup synthetics tests get abc-123
pup synthetics tests search --text "login"
pup synthetics locations list

Downtimes

Copy & paste โ€” that's it
pup downtime list
pup downtime get abc-123-def
pup downtime create --file downtime.json
pup downtime cancel abc-123-def

Infrastructure / Hosts

Copy & paste โ€” that's it
pup infrastructure hosts list
pup infrastructure hosts list --filter "env:prod"
pup infrastructure hosts list --count 100
pup infrastructure hosts get 

Events

Copy & paste โ€” that's it
pup events list --from 24h
pup events list --tags "source:deploy" --from 24h
pup events search --query "deploy" --from 24h
pup events get 

Users / Teams

Copy & paste โ€” that's it
pup users list
pup users get 
pup on-call teams list
pup on-call teams get 

Security

Copy & paste โ€” that's it
pup security signals list --query "*" --from 24h
pup security signals list --query "severity:critical" --from 24h
pup security rules list

Live Debugger

Copy & paste โ€” that's it
# Check service context (verify env has active instances)
pup debugger context my-svc
pup debugger context my-svc --env prod

# Find probe-able methods in a service
pup symdb search --service my-svc --query MyController --view probe-locations

# Place a log probe with capture expressions
# --probe-location accepts TYPE:METHOD or TYPE:METHOD(arg1, arg2, ...) with optional signature
pup debugger probes create --service my-svc --env prod \
 --probe-location "com.example.MyController:handleRequest" \
 --capture "request.id" --capture "request.headers" \
 --ttl 1h

# With method signature (useful when the method is overloaded)
pup debugger probes create --service my-svc --env prod \
 --probe-location "com.example.MyController:handleRequest(String, HttpHeaders)" \
 --capture "request.id" --ttl 1h

# Watch probe events โ€” compact output
pup debugger probes watch --fields "message,captures,timestamp" --timeout 60 --limit 10 --wait 5

# Watch โ€” template message only
pup debugger probes watch --fields "message" --limit 10

# List and delete probes
pup debugger probes list --service my-svc
pup debugger probes delete 

Service Catalog

Copy & paste โ€” that's it
pup service-catalog list
pup service-catalog get 

Notebooks

Copy & paste โ€” that's it
pup notebooks list
pup notebooks get 12345
pup notebooks create --file notebook.json

Observability Pipelines

Copy & paste โ€” that's it
pup obs-pipelines list
pup obs-pipelines get 
pup obs-pipelines create --file pipeline.json
pup obs-pipelines update --file pipeline.json
pup obs-pipelines delete 
pup obs-pipelines validate --file pipeline.json

LLM Observability

Copy & paste โ€” that's it
pup llm-obs projects list
pup llm-obs projects create --file project.json
pup llm-obs experiments list
pup llm-obs experiments list --filter-project-id 
pup llm-obs experiments list --filter-dataset-id 
pup llm-obs experiments create --file experiment.json
pup llm-obs experiments update --file experiment.json
pup llm-obs experiments delete --file delete-request.json
pup llm-obs datasets list --project-id 
pup llm-obs datasets create --project-id --file dataset.json

Reference Tables

Copy & paste โ€” that's it
pup reference-tables list
pup reference-tables get 
pup reference-tables create --file table.json
pup reference-tables batch-query --file query.json

Cost Cloud Configs

Copy & paste โ€” that's it
# AWS CUR configs
pup costs datadog aws-config list
pup costs datadog aws-config get 
pup costs datadog aws-config create --file config.json
pup costs datadog aws-config delete 

# Azure UC configs
pup costs datadog azure-config list
pup costs datadog azure-config get 
pup costs datadog azure-config create --file config.json
pup costs datadog azure-config delete 

# GCP usage cost configs
pup costs datadog gcp-config list
pup costs datadog gcp-config get 
pup costs datadog gcp-config create --file config.json
pup costs datadog gcp-config delete 

Subcommand Discovery

Copy & paste โ€” that's it
pup --help # List all commands
pup --help # Command-specific help

Error Handling

Error Cause Fix 401 Unauthorized Token expired pup auth refresh 403 Forbidden Missing scope Check app key permissions 404 Not Found Wrong ID/resource Verify resource exists Rate limited Too many requests Add delays between calls

Sites

Site DD_SITE value US1 (default) datadoghq.com US3 us3.datadoghq.com US5 us5.datadoghq.com EU1 datadoghq.eu AP1 ap1.datadoghq.com US1-FED ddog-gov.com