dd-monitors

작성자: datadog-labs

모니터 관리 - 생성, 업데이트, 음소거 및 알림 모범 사례.

npx skills add https://github.com/datadog-labs/pup --skill dd-monitors

Datadog Monitors

Create, manage, and maintain monitors for alerting.

Prerequisites

This requires the pup binary in your path.

pup - cargo install --git https://github.com/DataDog/pup

Quick Start

pup auth login

Common Operations

List Monitors

pup monitors list
pup monitors list --tags "team:platform"
pup monitors search --query "status:Alert"

Get Monitor

pup monitors get <id>

Create Monitor

pup monitors create --file monitor.json

Mute/Unmute

# Mute with duration
pup monitors update 12345 --file monitor-muted.json

# Or mute with specific end time
pup monitors update 12345 --file monitor-muted-until.json

# Unmute
pup monitors update 12345 --file monitor-unmuted.json

⚠️ Monitor Creation Best Practices

1. Avoid Alert Fatigue

RuleWhy
No flapping alertsUse last_Xm not last_1m
Meaningful thresholdsBased on SLOs, not guesses
Actionable alertsIf no action needed, don't alert
Include runbook@runbook-url in message
# WRONG - will flap constantly
query = "avg(last_1m):avg:system.cpu.user{*} > 50"  # ❌ Too sensitive

# CORRECT - stable alerting
query = "avg(last_5m):avg:system.cpu.user{env:prod} by {host} > 80"  # ✅ Reasonable window

2. Use Proper Scoping

# WRONG - alerts on everything
query = "avg(last_5m):avg:system.cpu.user{*} > 80"  # ❌ No scope

# CORRECT - scoped to what matters
query = "avg(last_5m):avg:system.cpu.user{env:prod,service:api} by {host} > 80"  # ✅

3. Set Recovery Thresholds

monitor = {
    "query": "avg(last_5m):avg:system.cpu.user{env:prod} > 80",
    "options": {
        "thresholds": {
            "critical": 80,
            "critical_recovery": 70,  # ✅ Prevents flapping
            "warning": 60,
            "warning_recovery": 50
        }
    }
}

4. Include Context in Messages

message = """
## High CPU Alert

Host: {{host.name}}
Current Value: {{value}}
Threshold: {{threshold}}

### Runbook
1. Check top processes: `ssh {{host.name}} 'top -bn1 | head -20'`
2. Check recent deploys
3. Scale if needed

@slack-ops @pagerduty-oncall
"""

⚠️ NEVER Delete Monitors Directly

Use safe deletion workflow (same as dashboards):

def safe_mark_monitor_for_deletion(monitor_id: str, client) -> bool:
    """Mark monitor instead of deleting."""
    monitor = client.get_monitor(monitor_id)
    name = monitor.get("name", "")
    
    if "[MARKED FOR DELETION]" in name:
        print(f"Already marked: {name}")
        return False
    
    new_name = f"[MARKED FOR DELETION] {name}"
    client.update_monitor(monitor_id, {"name": new_name})
    print(f"✓ Marked: {new_name}")
    return True

Monitor Types

TypeUse Case
metric alertCPU, memory, custom metrics
query alertComplex metric queries
service checkAgent check status
event alertEvent stream patterns
log alertLog pattern matching
compositeCombine multiple monitors
apmAPM metrics

Audit Monitors

# Find monitors without owners
pup monitors list | jq '.[] | select(.tags | contains(["team:"]) | not) | {id, name}'

# Find noisy monitors (high alert count)
pup monitors list | jq 'sort_by(.overall_state_modified) | .[:10] | .[] | {id, name, status: .overall_state}'

Downtime vs Muting

UseWhen
Mute monitorQuick one-off, < 1 hour
DowntimeScheduled maintenance, recurring
# Downtime (preferred)
pup downtime create --file downtime.json

Failure Handling

ProblemFix
Alert not firingCheck query returns data, thresholds
Too many alertsIncrease window, add recovery threshold
No data alertsCheck agent connectivity, metric exists
Auth errorpup auth refresh

References

datadog-labs의 다른 스킬

dd-audit
datadog-labs
감사 추적 조사 - 누가 무엇을 변경했는지, 키 손상, 비용 급증 근본 원인, 규정 준수 증거(SOC 2/PCI), AI 활동 감사.
official
agent-install
datadog-labs
Datadog Operator를 사용하여 Kubernetes에 Datadog Agent를 설치합니다 — Single Step Instrumentation(SSI)을 활성화하기 전에 필요하며, 이는 자동으로…
official
agent-observability-auto-experiment
datadog-labs
실제 Datadog LLM-Obs 데이터를 대상으로 반복적 코드 개선 힐클라임을 로컬에서 Claude Code를 에이전트로 사용하여 실행합니다. 기준 평가를 설정하고, 하나의…
official
agent-observability-eval-bootstrap
datadog-labs
프로덕션 트레이스에서 평가자를 부트스트랩합니다 — 기본적으로 온라인 LLM-판정 평가자를 제안하고, 확인 후 Datadog에 비활성화된 초안으로 생성합니다…
official
agent-observability-eval-pipeline
datadog-labs
계측된 ml_app을 위한 엔드투엔드 에이전트 관측성 파이프라인 — 프로덕션 트레이스를 분류하고, 실패의 근본 원인을 분석하며, 평가기를 부트스트랩한 다음, (선택적으로)…
official
agent-observability-experiment-analyzer
datadog-labs
LLM 실험 결과를 분석합니다. 단일 또는 비교 실험, 탐색적 또는 Q&A 모드를 처리합니다. 사용자가 "실험 분석", "비교…"라고 말할 때 사용하세요.
official
agent-observability-replay-trace
datadog-labs
개발자가 마음에 들지 않는 출력을 생성한 특정 Agent Observability / LLM Obs 트레이스 하나를 반복 작업하고자 할 때 사용합니다 — 해당 트레이스를 다시 실행하여…
official
agent-observability-trace-rca
datadog-labs
프로덕션 LLM 트레이스에 대한 근본 원인 분석. LLM 애플리케이션이 실패하는 이유를 진단하며, 평가 판정, 런타임 오류 또는 구조적 문제를 기반으로 작동합니다…
official