ops-monitor

GitHub

统一APM监控技能,支持配置Datadog、New Relic和OpenTelemetry凭证,轮询活跃告警、错误追踪及实体健康状态,提供实时监视与默认健康检查功能。

claude-ops/skills/ops-monitor/SKILL.md Lifecycle-Innovations-Limited/claude-ops

Trigger Scenarios

需要查询系统或应用的健康状况 需要查看活跃的告警或错误追踪 需要配置或更新监控后端凭证

Install

npx skills add Lifecycle-Innovations-Limited/claude-ops --skill ops-monitor -g -y
More Options

Non-standard path

npx skills add https://github.com/Lifecycle-Innovations-Limited/claude-ops/tree/main/claude-ops/skills/ops-monitor -g -y

Use without installing

npx skills use Lifecycle-Innovations-Limited/claude-ops@ops-monitor

指定 Agent (Claude Code)

npx skills add Lifecycle-Innovations-Limited/claude-ops --skill ops-monitor -a claude-code -g -y

安装 repo 全部 skill

npx skills add Lifecycle-Innovations-Limited/claude-ops --all -g -y

预览 repo 内 skill

npx skills add Lifecycle-Innovations-Limited/claude-ops --list

SKILL.md

Frontmatter
{
    "name": "ops-monitor",
    "effort": "low",
    "maxTurns": 20,
    "description": "Unified APM and monitoring surface. Polls Datadog, New Relic, and OpenTelemetry backends for active alerts, error traces, and entity health. Use --watch for live polling every 60 seconds. Use --setup to configure monitoring credentials.",
    "allowed-tools": [
        "Bash",
        "Read",
        "Agent",
        "AskUserQuestion",
        "TeamCreate",
        "SendMessage"
    ],
    "argument-hint": "[--watch] [--setup] [--backend datadog|newrelic|otel]"
}

Runtime Context

PREFS="${CLAUDE_PLUGIN_DATA_DIR:-$HOME/.claude/plugins/data/ops-ops-marketplace}/preferences.json"
DD_API_KEY=$(jq -r '.datadog_api_key // empty' "$PREFS" 2>/dev/null)
NR_API_KEY=$(jq -r '.newrelic_api_key // empty' "$PREFS" 2>/dev/null)
OTEL_ENDPOINT=$(jq -r '.otel_endpoint // empty' "$PREFS" 2>/dev/null)

Determine $ARGUMENTS mode:

  • Contains --setup → run Setup flow
  • Contains --watch → run Watch mode
  • Otherwise → run Default health check

OPS ► MONITOR

Setup flow (--setup)

Ask which backends to configure:

Which monitoring backends would you like to configure?
[Datadog]  [New Relic]  [OpenTelemetry]  [All three]

For each selected backend, collect credentials via AskUserQuestion free-text input (one at a time, ≤4 options per call):

Datadog:

  1. datadog_api_key — API Key from app.datadoghq.com/organization-settings/api-keys
  2. datadog_app_key — Application Key from app.datadoghq.com/organization-settings/application-keys

New Relic:

  1. newrelic_api_key — User API Key from one.newrelic.com/api-keys
  2. newrelic_account_id — Numeric Account ID from New Relic admin portal

OpenTelemetry:

  1. otel_endpoint — Base URL of your OTEL-compatible backend (e.g., https://otlp.grafana.net)

Write each credential to preferences.json using atomic tmpfile swap:

tmp=$(mktemp)
jq --arg k "$KEY" --arg v "$VALUE" '.[$k] = $v' "$PREFS" > "$tmp" && mv "$tmp" "$PREFS"

Run smoke test after saving:

  • Datadog: curl -sf -H "DD-API-KEY: $DD_API_KEY" -H "DD-APPLICATION-KEY: $DD_APP_KEY" "https://api.datadoghq.com/api/v1/validate" → expect {"valid": true}
  • New Relic: curl -sf -H "Api-Key: $NR_API_KEY" "https://api.newrelic.com/graphql" -d '{"query":"{ actor { user { name } } }"}' → expect data.actor.user
  • OTEL: curl -sf "$OTEL_ENDPOINT/healthz" → expect HTTP 200

Report ✅ or ❌ with status for each backend.

Agent Teams support

If CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 is set, use Agent Teams when querying multiple backends simultaneously. This enables:

  • Backend probes run in parallel with shared context (e.g., Datadog agent detects latency spike → OTEL agent can correlate with traces)
  • You can steer: "focus on Datadog alerts first, then cross-reference with New Relic"
  • Real-time progress: agents report per-backend as results arrive

Team setup (only when flag is enabled, multiple backends configured):

TeamCreate("monitor-probes")
Agent(team_name="monitor-probes", name="datadog-probe", subagent_type="ops:monitor-agent", ...)
Agent(team_name="monitor-probes", name="newrelic-probe", subagent_type="ops:monitor-agent", ...)
Agent(team_name="monitor-probes", name="otel-probe", subagent_type="ops:monitor-agent", ...)

If the flag is NOT set or only one backend is configured, use a single monitor-agent subagent.

Default health check (no flags)

Spawn monitor-agent via the Agent tool. Display the result as a formatted dashboard:

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 OPS ► MONITOR                       [<timestamp>]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 DATADOG      ✅ healthy (0 alerts)
 NEW RELIC    🔴 2 critical entities
 OTEL         ✅ healthy
──────────────────────────────────────────────────────
 Total alerts: 2   Severity: CRITICAL

Status icons:

  • — healthy (0 alerts / configured and reachable)
  • ⚠️ — warning (warn-level alerts present)
  • 🔴 — critical (critical alerts or unreachable)
  • — not configured

For each alert or critical entity, display: service name, alert name, and link to the relevant dashboard.

If no backends are configured, show a setup prompt:

No monitoring backends configured. Run /ops:monitor --setup to add Datadog, New Relic, or OTEL.

Watch mode (--watch)

Poll every 60 seconds. On each tick:

while true; do
  RESULT=$(# spawn monitor-agent and capture JSON output)
  # Diff against previous tick
  # Print: timestamp, changed items only
  # 🆕 new alert: <name>
  # ✅ resolved: <name>
  sleep 60
done

Exit on Ctrl-C.

--backend filter

If --backend datadog|newrelic|otel is specified, query and display only that backend.

CLI/API Reference

Backend Auth header Base URL Health endpoint
Datadog DD-API-KEY: $key + DD-APPLICATION-KEY: $app_key https://api.datadoghq.com /api/v1/validate
New Relic Api-Key: $key https://api.newrelic.com/graphql POST GraphQL query
OTEL varies by backend $OTEL_ENDPOINT /healthz
# Datadog — active alerts
curl -sf \
  -H "DD-API-KEY: ${DD_API_KEY}" \
  -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
  "https://api.datadoghq.com/api/v1/monitor?monitor_tags=*&with_downtimes=false" \
  | jq '[.[] | select(.overall_state == "Alert" or .overall_state == "Warn")]'

# New Relic — critical entities (GraphQL)
curl -sf \
  -H "Api-Key: ${NR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{"query":"{ actor { entitySearch(queryBuilder: {alertSeverity: CRITICAL}) { results { entities { name alertSeverity entityType } } } } }"}' \
  "https://api.newrelic.com/graphql"

# OTEL — health check
curl -sf "${OTEL_ENDPOINT}/healthz"

Version History

  • 64bad13 Current 2026-08-12 09:01

Same Skill Collection

claude-ops/skills/boss/SKILL.md
claude-ops/skills/flow/SKILL.md
claude-ops/skills/ledger/SKILL.md
claude-ops/skills/ops-accounts/SKILL.md
claude-ops/skills/ops-ar/SKILL.md
claude-ops/skills/ops-aws-audit/SKILL.md
claude-ops/skills/ops-comms/SKILL.md
claude-ops/skills/ops-competitors/SKILL.md
claude-ops/skills/ops-credentials/SKILL.md
claude-ops/skills/ops-daemon/SKILL.md
claude-ops/skills/ops-dash/SKILL.md
claude-ops/skills/ops-deploy-fix/SKILL.md
claude-ops/skills/ops-deploy/SKILL.md
claude-ops/skills/ops-desktop/SKILL.md
claude-ops/skills/ops-doctor/SKILL.md
claude-ops/skills/ops-ecom/SKILL.md
claude-ops/skills/ops-feature-dev/SKILL.md
claude-ops/skills/ops-fires/SKILL.md
claude-ops/skills/ops-fleet/SKILL.md
claude-ops/skills/ops-go/SKILL.md
claude-ops/skills/ops-gtm/SKILL.md
claude-ops/skills/ops-home/SKILL.md
claude-ops/skills/ops-inbox/SKILL.md
claude-ops/skills/ops-integrate/SKILL.md
claude-ops/skills/ops-leadgen/SKILL.md
claude-ops/skills/ops-linear/SKILL.md
claude-ops/skills/ops-mac/SKILL.md
claude-ops/skills/ops-marketing/SKILL.md
claude-ops/skills/ops-mcp/SKILL.md
claude-ops/skills/ops-merge/SKILL.md
claude-ops/skills/ops-next/SKILL.md
claude-ops/skills/ops-orchestrate/SKILL.md
claude-ops/skills/ops-package/SKILL.md
claude-ops/skills/ops-pocket/SKILL.md
claude-ops/skills/ops-projects/SKILL.md
claude-ops/skills/ops-recap/SKILL.md
claude-ops/skills/ops-release/SKILL.md
claude-ops/skills/ops-resume/SKILL.md
claude-ops/skills/ops-revenue/SKILL.md
claude-ops/skills/ops-rotate-setup/SKILL.md
claude-ops/skills/ops-rotate/SKILL.md
claude-ops/skills/ops-secret-sync/SKILL.md
claude-ops/skills/ops-settings/SKILL.md
claude-ops/skills/ops-ship/SKILL.md
claude-ops/skills/ops-speedup/SKILL.md
claude-ops/skills/ops-status/SKILL.md
claude-ops/skills/ops-triage/SKILL.md
claude-ops/skills/ops-unifi/SKILL.md
claude-ops/skills/ops-update/SKILL.md

Metadata

Files
0
Version
64bad13
Hash
7f8c6dd8
Indexed
2026-08-12 09:01

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-12 17:01
浙ICP备14020137号-1 $방문자$