dd-pup by datadog-labs/agent-skills
npx skills add https://github.com/datadog-labs/agent-skills --skill dd-pup用于 Datadog API 操作的 Pup CLI。支持 OAuth2 和 API 密钥认证。
| 任务 | 命令 |
|---|---|
| 搜索错误日志 | pup logs search --query "status:error" --duration 1h |
| 列出监视器 | pup monitors list |
| 静音监视器 | pup monitors mute --id 123 --duration 1h |
| 查找慢速追踪 | pup apm traces list --service api --min-duration 500ms |
| 列出活跃事件 | pup incidents list --status active |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 创建事件 | pup incidents create --title "Issue" --severity SEV-2 |
| 查询指标 | pup metrics query --query "avg:system.cpu.user{*}" |
| 列出主机 | pup hosts list |
| 检查 SLO | pup slos list |
| 谁在值班 | pup on-call who --team my-team |
| 安全信号 | pup security signals list --severity critical |
| 检查认证 | pup auth status |
| 刷新令牌 | pup auth refresh |
使用安装说明安装 pup。
pup auth login # OAuth2 浏览器流程(推荐)
pup auth status # 检查令牌有效性
pup auth refresh # 刷新过期令牌(无需浏览器)
pup auth logout # 清除凭据
⚠️ 令牌会过期(约 1 小时)。如果命令在对话过程中因 401/403 失败:
pup auth refresh # 先尝试刷新
pup auth login # 如果刷新失败,则重新完整认证
# 使用环境变量或:
export DD_API_KEY=your-api-key
export DD_APP_KEY=your-app-key
export DD_SITE=datadoghq.com # 或 datadoghq.eu 等
pup monitors list --limit 10
pup monitors list --tags "env:prod"
pup monitors get --id 12345
pup monitors mute --id 12345 --duration 1h
pup monitors unmute --id 12345
pup monitors create --name "High CPU" --type "metric alert" \
--query "avg(last_5m):avg:system.cpu.user{*} > 80" \
--message "CPU high @slack-ops"
pup logs search --query "status:error" --duration 1h
pup logs search --query "service:payment-api" --duration 1h --limit 100
pup logs search --query "@http.status_code:5*" --duration 24h
pup logs search --query "env:prod level:error" --duration 1h --json
pup metrics query --query "avg:system.cpu.user{*}" --duration 1h
pup metrics query --query "sum:trace.express.request.hits{service:api}" --duration 1h
pup metrics list --filter "system.*"
pup apm services list
pup apm traces list --service my-service --duration 1h
pup apm traces list --service api --min-duration 500ms --duration 1h
pup apm traces list --service api --status error --duration 1h
pup apm traces get abc123def456
pup incidents list --status active
pup incidents list --status resolved --duration 7d
pup incidents create --title "API Degradation" --severity SEV-2
pup incidents update --id abc-123 --status stable
pup incidents resolve --id abc-123
pup dashboards list
pup dashboards list --tags "team:platform"
pup dashboards get --id abc-123
pup dashboards create --title "My Dashboard" --description "..." --widgets '[...]'
pup slos list
pup slos get --id slo-123
pup slos history --id slo-123 --duration 30d
pup synthetics list
pup synthetics results --test-id abc-123
pup synthetics trigger --test-id abc-123
pup on-call teams list
pup on-call schedules list
pup on-call who --team platform-team
pup hosts list --limit 50
pup hosts list --filter "env:prod"
pup hosts mute --hostname web-01 --duration 1h
pup hosts get --hostname web-01
pup events list --duration 24h
pup events list --tags "source:deploy"
pup events post --title "Deploy started" --text "v1.2.3" --tags "env:prod"
pup downtime list
pup downtime create --scope "env:staging" --duration 2h --message "Maintenance"
pup downtime cancel --id 12345
pup users list
pup teams list
pup security signals list --duration 24h
pup security signals list --severity critical
pup services list
pup services get --name payment-api
pup notebooks list
pup notebooks get --id 12345
pup workflows list
pup workflows trigger --id workflow-123 --input '{"key": "value"}'
pup --help # 列出所有命令
pup <command> --help # 特定命令的帮助
| 错误 | 原因 | 修复 |
|---|---|---|
| 401 未授权 | 令牌过期 | pup auth refresh |
| 403 禁止访问 | 缺少权限范围 | 检查应用密钥权限 |
| 404 未找到 | ID/资源错误 | 验证资源是否存在 |
| 速率限制 | 请求过多 | 在调用之间添加延迟 |
有关安装说明,请参阅安装 Pup。
which pup
pup --version
| 站点 | DD_SITE 值 |
|---|---|
| US1 (默认) | datadoghq.com |
| US3 | us3.datadoghq.com |
| US5 | us5.datadoghq.com |
| EU1 | datadoghq.eu |
| AP1 | ap1.datadoghq.com |
| US1-FED | ddog-gov.com |
每周安装数
212
仓库
GitHub 星标数
77
首次出现
2026年2月26日
安全审计
安装于
codex208
github-copilot208
cursor205
gemini-cli203
opencode203
amp201
Pup CLI for Datadog API operations. Supports OAuth2 and API key auth.
| Task | Command |
|---|---|
| Search error logs | pup logs search --query "status:error" --duration 1h |
| List monitors | pup monitors list |
| Mute a monitor | pup monitors mute --id 123 --duration 1h |
| Find slow traces | pup apm traces list --service api --min-duration 500ms |
| List active incidents | pup incidents list --status active |
| Create incident | pup incidents create --title "Issue" --severity SEV-2 |
| Query metrics | pup metrics query --query "avg:system.cpu.user{*}" |
| List hosts | pup hosts list |
| Check SLOs | pup slos list |
| Who's on call | pup on-call who --team my-team |
| Security signals | pup security signals list --severity critical |
| Check auth | pup auth status |
| Refresh token | pup auth refresh |
Install pup using the setup instructions.
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:
pup auth refresh # Try refresh first
pup auth login # If refresh fails, full re-auth
# 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.
pup monitors list --limit 10
pup monitors list --tags "env:prod"
pup monitors get --id 12345
pup monitors mute --id 12345 --duration 1h
pup monitors unmute --id 12345
pup monitors create --name "High CPU" --type "metric alert" \
--query "avg(last_5m):avg:system.cpu.user{*} > 80" \
--message "CPU high @slack-ops"
pup logs search --query "status:error" --duration 1h
pup logs search --query "service:payment-api" --duration 1h --limit 100
pup logs search --query "@http.status_code:5*" --duration 24h
pup logs search --query "env:prod level:error" --duration 1h --json
pup metrics query --query "avg:system.cpu.user{*}" --duration 1h
pup metrics query --query "sum:trace.express.request.hits{service:api}" --duration 1h
pup metrics list --filter "system.*"
pup apm services list
pup apm traces list --service my-service --duration 1h
pup apm traces list --service api --min-duration 500ms --duration 1h
pup apm traces list --service api --status error --duration 1h
pup apm traces get abc123def456
pup incidents list --status active
pup incidents list --status resolved --duration 7d
pup incidents create --title "API Degradation" --severity SEV-2
pup incidents update --id abc-123 --status stable
pup incidents resolve --id abc-123
pup dashboards list
pup dashboards list --tags "team:platform"
pup dashboards get --id abc-123
pup dashboards create --title "My Dashboard" --description "..." --widgets '[...]'
pup slos list
pup slos get --id slo-123
pup slos history --id slo-123 --duration 30d
pup synthetics list
pup synthetics results --test-id abc-123
pup synthetics trigger --test-id abc-123
pup on-call teams list
pup on-call schedules list
pup on-call who --team platform-team
pup hosts list --limit 50
pup hosts list --filter "env:prod"
pup hosts mute --hostname web-01 --duration 1h
pup hosts get --hostname web-01
pup events list --duration 24h
pup events list --tags "source:deploy"
pup events post --title "Deploy started" --text "v1.2.3" --tags "env:prod"
pup downtime list
pup downtime create --scope "env:staging" --duration 2h --message "Maintenance"
pup downtime cancel --id 12345
pup users list
pup teams list
pup security signals list --duration 24h
pup security signals list --severity critical
pup services list
pup services get --name payment-api
pup notebooks list
pup notebooks get --id 12345
pup workflows list
pup workflows trigger --id workflow-123 --input '{"key": "value"}'
pup --help # List all commands
pup <command> --help # Command-specific help
| 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 |
See Setup Pup for installation instructions.
which pup
pup --version
| 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 |
Weekly Installs
212
Repository
GitHub Stars
77
First Seen
Feb 26, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex208
github-copilot208
cursor205
gemini-cli203
opencode203
amp201
Azure 升级评估与自动化工具 - 轻松迁移 Functions 计划、托管层级和 SKU
79,900 周安装