datadog-analyser

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Datadog Analyser

Datadog 分析工具

Investigate and analyse Datadog observability data using the
pup
CLI.
使用
pup
CLI调查和分析Datadog可观测性数据。

Arguments

参数

  • $ARGUMENTS[0]
    — (optional) What to analyse (e.g.
    "error rate last 1h"
    ,
    "triggered monitors"
    ,
    "incidents today"
    ,
    "service:api logs"
    ). If not provided, perform a general health overview.
  • $ARGUMENTS[0]
    —(可选)要分析的内容(例如
    "error rate last 1h"
    "triggered monitors"
    "incidents today"
    "service:api logs"
    )。如果未提供,则执行常规健康概览。

System Requirements

系统要求

Output Directory

输出目录

.datadog-analyser-tmp/
└── report.md    # Final analysis report
.datadog-analyser-tmp/
└── report.md    # 最终分析报告

Execution

执行步骤

1. Verify Connection

1. 验证连接

Run
pup test
to confirm the CLI is configured and connected:
bash
pup test
If this fails, use
AskUserQuestion
to inform the user that
pup
is not configured or
DD_API_KEY
/
DD_APP_KEY
are not set, and link to the setup guide: https://github.com/datadog-labs/pup/blob/main/README.md
Do NOT continue until
pup test
succeeds.
运行
pup test
确认CLI已配置并连接:
bash
pup test
如果验证失败,使用AskUserQuestion告知用户
pup
未配置或
DD_API_KEY
/
DD_APP_KEY
未设置,并链接到设置指南:https://github.com/datadog-labs/pup/blob/main/README.md
pup test
成功前,请勿继续执行。

2. Discover Available Commands

2. 查看可用命令

Run
pup agent guide
to get the full list of available commands and usage patterns for this session:
bash
pup agent guide
If
pup agent guide
is not available (command not found), use the known command reference below and continue.
运行
pup agent guide
获取本次会话的完整可用命令列表和使用模式:
bash
pup agent guide
如果
pup agent guide
不可用(命令未找到),请使用下方已知命令参考继续操作。

3. Analyse

3. 执行分析

Based on
$ARGUMENTS[0]
, determine which
pup
commands are most relevant. Use
--output=json
(default) for all commands to get structured output. Run commands sequentially.
Common analysis patterns:
GoalCommands
Triggered/alerting monitors
pup monitors list
,
pup monitors search --query="status:alert"
Error logs
pup logs search --query="status:error" --from="1h"
Metric trend
pup metrics query --query="<metric>" --from="<window>"
Active incidents
pup incidents list
SLO health
pup slos list
,
pup slos status <id>
APM service health
pup apm services
,
pup apm dependencies
Security signals
pup security signals list
,
pup security findings search
Error tracking
pup error-tracking issues search --query="<service>"
Synthetics failures
pup synthetics tests list
CI failures
pup cicd pipelines list
,
pup cicd events list
All commands default to JSON output. Use flags like
--from
,
--to
,
--query
,
--tags
to narrow scope. Refer to
pup <command> --help
for available flags.
根据
$ARGUMENTS[0]
确定最相关的
pup
命令。所有命令默认使用
--output=json
以获取结构化输出。按顺序执行命令。
常见分析模式:
目标命令
已触发/告警的监控器
pup monitors list
,
pup monitors search --query="status:alert"
错误日志
pup logs search --query="status:error" --from="1h"
指标趋势
pup metrics query --query="<metric>" --from="<window>"
活跃事件
pup incidents list
SLO健康状况
pup slos list
,
pup slos status <id>
APM服务健康
pup apm services
,
pup apm dependencies
安全信号
pup security signals list
,
pup security findings search
错误追踪
pup error-tracking issues search --query="<service>"
合成监控失败情况
pup synthetics tests list
CI失败情况
pup cicd pipelines list
,
pup cicd events list
所有命令默认输出JSON格式。可使用
--from
--to
--query
--tags
等参数缩小范围。请参考
pup <command> --help
查看可用参数。

4. Report

4. 生成报告

All timestamps in the report must use user's local time, not UTC.
Write a structured analysis to
.datadog-analyser-tmp/report.md
using the Write tool:
  1. Summary — Overall health status and key findings
  2. Details — Breakdown of findings per domain (monitors, logs, metrics, etc.)
  3. Anomalies — Anything alerting, degraded, or unusual
  4. Recommendations — Suggested follow-up actions
Inform the user of the report location:
.datadog-analyser-tmp/report.md
<tags> <mode>think</mode> <custom>yes</custom> </tags>
报告中的所有时间戳必须使用用户的本地时间,而非UTC时间。
使用Write工具将结构化分析内容写入
.datadog-analyser-tmp/report.md
  1. 摘要 — 整体健康状态和关键发现
  2. 详情 — 按领域(监控器、日志、指标等)细分的发现内容
  3. 异常情况 — 所有告警、性能下降或异常内容
  4. 建议 — 建议的后续操作
告知用户报告位置:
.datadog-analyser-tmp/report.md
<tags> <mode>think</mode> <custom>yes</custom> </tags>