360 Secure SkillHub
360 安全技能中心

Skylv Error Monitoring Agent

核心功能:实时监控日志、API、worker的错误,智能合并相似堆栈轨迹降90%噪音,针对错误率飙升或新错误告警,关联部署/配置做根因分析,支持自动修复。典型场景:错误spike告警、事故排查、自动修复已知问题、跟踪错误预算。通过命令行操作,可配置规则,输出统计、分析结果及告警。

sky-lv
sky-lv
热度 47.84
最近更新 2026-05-11 17:47:06
分类:开发依赖:代码执行 / 读写文件 / 第三方 API / 内部调用大模型应用场景:调试排错 / DevOps / 自动化脚本 / 报告撰写 ...

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add skylv-error-monitoring-agent
Metadata
name
error-monitoring-agent
slug
error-monitoring-agent
version
1.0.1
description
Catch errors before users report them. Real-time monitoring, auto-grouping, and smart alerts that reduce noise by 90%.
author
SKY-lv
license
MIT-0
tags
["monitoring","debugging","alerting"]
keywords
["error monitoring","error tracking","alerting","exception handling","error analysis","bug tracking","incident detection","real-time monitoring"]
triggers
error monitoring, error tracking, catch errors, alert on error, exception tracking

error-monitoring-agent

Catch errors before users report them. Group similar issues, alert on spikes, and auto-resolve known problems — all with zero configuration.

What It Does

  • Real-time detection — Monitor logs, APIs, workers for errors
  • Smart grouping — Merge similar stack traces, reduce noise 90%
  • Rate alerts — Alert when error rate spikes or new error types appear
  • Root cause — Correlate errors with deploys, config changes
  • Auto-resolve — Apply known fixes automatically (restart, retry, rollback)

Quick Start

# 1. Start monitoring
node monitor.js watch --source logs,api

# 2. Check current errors
node monitor.js status

# 3. Set up alert
node monitor.js alert --rule "error_rate > 10/min" --channel slack

# 4. View top errors
node monitor.js aggregate --top 10

Common Use Cases

🚨 Alert on Error Spikes

# Alert when error rate exceeds threshold
node monitor.js alert --rule "error_rate > 10/min" --channel slack

# Alert on new error types
node monitor.js alert --rule "new_error_type" --channel pagerduty

# Alert on spike vs baseline
node monitor.js alert --rule "error_spike > 3x_baseline" --channel email

🔍 Investigate Incident

# Find all errors in time window
node monitor.js aggregate --time-window 1h --top 20

# Analyze specific error
node monitor.js analyze --error-id err_abc123 --depth 5

# Correlate with recent changes
node monitor.js analyze --correlate deploy-log,config-change

🤖 Auto-Resolve Known Issues

# Enable auto-resolution
node monitor.js auto-resolve --strategy restart,retry,rollback

# Apply approved fixes only
node monitor.js auto-resolve --known-fixes db --apply-approved

📊 Track Error Budget

# Check error rate vs SLO
node monitor.js budget --slo 99.9% --window 30d

# View error budget remaining
node monitor.js budget --remaining

All Commands

Command Purpose
watch --source <src> Start monitoring
status Current error summary
aggregate --top <n> Group similar errors
alert --rule <rule> Create alert rule
analyze --error-id <id> Root cause analysis
auto-resolve --strategy <s> Enable auto-fix
budget --slo <target> Check error budget

Configuration

{
  "monitoring": {
    "sources": ["application", "infrastructure", "api"],
    "sampling": 1.0,
    "retention": "30d",
    "alertRules": [
      { "condition": "error_rate > 10/min", "action": "page-oncall" },
      { "condition": "new_error_type", "action": "notify-channel" }
    ],
    "autoResolve": {
      "enabled": true,
      "approvedStrategies": ["restart-service", "retry-request"]
    }
  }
}