datadog-analyser
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDatadog Analyser
Datadog 分析工具
Investigate and analyse Datadog observability data using the CLI.
pup使用 CLI调查和分析Datadog可观测性数据。
pupArguments
参数
- — (optional) What to analyse (e.g.
$ARGUMENTS[0],"error rate last 1h","triggered monitors","incidents today"). If not provided, perform a general health overview."service:api logs"
- —(可选)要分析的内容(例如
$ARGUMENTS[0]、"error rate last 1h"、"triggered monitors"、"incidents today")。如果未提供,则执行常规健康概览。"service:api logs"
System Requirements
系统要求
- CLI installed — see https://github.com/datadog-labs/pup/blob/main/README.md
pup - and
DD_API_KEYenvironment variables setDD_APP_KEY - set if not using
DD_SITE(optional)datadoghq.com
- 已安装CLI — 详见https://github.com/datadog-labs/pup/blob/main/README.md
pup - 已设置和
DD_API_KEY环境变量DD_APP_KEY - 若未使用,需设置
datadoghq.com(可选)DD_SITE
Output Directory
输出目录
.datadog-analyser-tmp/
└── report.md # Final analysis report.datadog-analyser-tmp/
└── report.md # 最终分析报告Execution
执行步骤
1. Verify Connection
1. 验证连接
Run to confirm the CLI is configured and connected:
pup testbash
pup testIf this fails, use to inform the user that is not configured or / are not set, and link to the setup guide: https://github.com/datadog-labs/pup/blob/main/README.md
AskUserQuestionpupDD_API_KEYDD_APP_KEYDo NOT continue until succeeds.
pup test运行确认CLI已配置并连接:
pup testbash
pup test如果验证失败,使用AskUserQuestion告知用户未配置或/未设置,并链接到设置指南:https://github.com/datadog-labs/pup/blob/main/README.md
pupDD_API_KEYDD_APP_KEY在成功前,请勿继续执行。
pup test2. Discover Available Commands
2. 查看可用命令
Run to get the full list of available commands and usage patterns for this session:
pup agent guidebash
pup agent guideIf is not available (command not found), use the known command reference below and continue.
pup agent guide运行获取本次会话的完整可用命令列表和使用模式:
pup agent guidebash
pup agent guide如果不可用(命令未找到),请使用下方已知命令参考继续操作。
pup agent guide3. Analyse
3. 执行分析
Based on , determine which commands are most relevant. Use (default) for all commands to get structured output. Run commands sequentially.
$ARGUMENTS[0]pup--output=jsonCommon analysis patterns:
| Goal | Commands |
|---|---|
| Triggered/alerting monitors | |
| Error logs | |
| Metric trend | |
| Active incidents | |
| SLO health | |
| APM service health | |
| Security signals | |
| Error tracking | |
| Synthetics failures | |
| CI failures | |
All commands default to JSON output. Use flags like , , , to narrow scope. Refer to for available flags.
--from--to--query--tagspup <command> --help根据确定最相关的命令。所有命令默认使用以获取结构化输出。按顺序执行命令。
$ARGUMENTS[0]pup--output=json常见分析模式:
| 目标 | 命令 |
|---|---|
| 已触发/告警的监控器 | |
| 错误日志 | |
| 指标趋势 | |
| 活跃事件 | |
| SLO健康状况 | |
| APM服务健康 | |
| 安全信号 | |
| 错误追踪 | |
| 合成监控失败情况 | |
| CI失败情况 | |
所有命令默认输出JSON格式。可使用、、、等参数缩小范围。请参考查看可用参数。
--from--to--query--tagspup <command> --help4. Report
4. 生成报告
All timestamps in the report must use user's local time, not UTC.
Write a structured analysis to using the Write tool:
.datadog-analyser-tmp/report.md- Summary — Overall health status and key findings
- Details — Breakdown of findings per domain (monitors, logs, metrics, etc.)
- Anomalies — Anything alerting, degraded, or unusual
- Recommendations — Suggested follow-up actions
Inform the user of the report location:
<tags>
<mode>think</mode>
<custom>yes</custom>
</tags>.datadog-analyser-tmp/report.md报告中的所有时间戳必须使用用户的本地时间,而非UTC时间。
使用Write工具将结构化分析内容写入:
.datadog-analyser-tmp/report.md- 摘要 — 整体健康状态和关键发现
- 详情 — 按领域(监控器、日志、指标等)细分的发现内容
- 异常情况 — 所有告警、性能下降或异常内容
- 建议 — 建议的后续操作
告知用户报告位置:
<tags>
<mode>think</mode>
<custom>yes</custom>
</tags>.datadog-analyser-tmp/report.md