log-anomaly-detection
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "log-anomaly-detection" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-2c366d64c27d3fecf5266c35d97e42a9f4fca966c5eefba845b1857a643ca0f5. Verify the upstream source and version against https://skillhub.cn/skills/user_c5d41a7d/log-anomaly-detection before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
A log anomaly detection skill for real-time monitoring of application logs that automatically compares current error rates to historical baselines, quickly identifies abnormal fluctuations, distinguishes warning and critical levels, and pushes alerts via Telegram for timely team response.
Introduction source: third_party · user_c5d41a7d · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Audience
- Translation pending; see source documentation.
- Inputs and outputs
- Translation pending; see source documentation.
- Software, accounts and paid services
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: "log-anomaly-detection"
description: "日志异常检测"日志异常检测
适用场景
- 自动比较当前错误率和历史基线,及早发现异常。
功能说明
用统计方式持续盯日志,发现错误激增时快速告警。
这个 Skill 能帮你做什么
- 自动比较当前错误率和历史基线,及早发现异常。
- 区分 warning 与 urgent,减少无效报警。
- 让夜间问题在影响用户前被提前捕获。
需要的工具/依赖
| 类型 | 工具/能力 | 用途 | 说明 |
|---|---|---|---|
| 内置 | filesystem |
读取与分析日志文件 | 内置能力 |
| 内置 | telegram |
发送异常告警 | 内置能力 |
快速体验版(先跑一轮)
你是我的 AI 自动化助手。
请帮我做“日志异常检测”的预演版:
1. 读取最近30分钟日志。
2. 统计 ERROR 类型频率。
3. 与近24小时基线比较。
4. 输出 warning/critical 判定和样例错误。
产品化增强版
输入参数
| 参数 | 示例 | 是否必填 | 说明 |
|---|---|---|---|
log_paths |
/var/log/app/*.log |
是 | 日志文件路径 |
error_patterns |
ERROR, Exception, timeout |
是 | 异常模式 |
baseline_window |
24h |
是 | 基线统计窗口 |
warning_threshold |
2x |
是 | warning 阈值 |
critical_threshold |
5x |
是 | critical 阈值 |
sample_limit |
10 |
否 | 告警附带样例数量 |
标准输出格式
# 日志异常检测 - 运行结果
## 摘要
- 本次运行目标:...
- 运行模式:preview / scheduled / production
- 数据覆盖范围:...
## 处理结果
- 错误率、基线对比、异常等级、样例日志、可能原因、建议动作
## 建议动作
| 优先级 | 动作 | 对象/负责人 | 截止时间 | 依据 |
|---|---|---|---|---|
## 待人工确认
- ...
输出样例
- 当前 ERROR 率 3.2%,为 24h 基线 2.7 倍,等级 warning。
- 样例:payment timeout 42 次,集中在 10:00-10:15。
运行流程
- 读取最近日志并按时间窗口切片。
- 按异常模式统计频率和类型。
- 与滚动基线比较并判定等级。
- 输出样例、聚类和建议排查路径。
人工确认点
- 重启服务、删除日志或修改告警阈值前需要确认。
- critical 告警对外同步前可按规则确认。
交付验收
- 30 分钟内发现显著异常。
- 误报率低于 10%。
- critical 漏报为 0 或有明确复盘原因。
风险控制
- 不上传完整敏感日志。
- 日志样例需要脱敏 token、邮箱和用户标识。
失败处理
- 日志为空时输出采集异常。
- 基线不足时降级为固定阈值并标记低置信度。
可选升级方向
- 增加专属配置文件,固化参数、阈值、渠道和运行频率。
- 接入运行日志和效果复盘,统计成功率、误报率、耗时和人工介入次数。
- 根据具体客户场景扩展字段、模板、评分规则和报告样式。
稳定自动版(可长期运行)
1) 异常检测逻辑
function detectAnomaly(lines) {
const errorRate = lines.filter(l => l.includes('ERROR')).length / lines.length;
const baseline = getBaseline(); // Historical average
return errorRate > baseline * 2;
}
2) 执行提示词(自动版)
你是我的 AI 自动化助手,请执行“Log Anomaly Detection”。
每 30 分钟执行:
1. 读取最近日志。
2. 按错误类型统计频率。
3. 对比滚动24小时基线。
4. 超过2倍基线:warning。
5. 超过5倍基线:立即告警。
6. 告警中附带样例错误消息。
质量等级
- 难度:高级
- 风险:中
- 自动化程度:可定时
- 适用对象:企业
成功标准
- Anomalies detected within 30 min
- 误报需要记录样本并持续调优阈值。
- critical 级异常需要有告警记录和复盘机制
Current listing version
1.0.0
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决企业运维中日志异常检测的高频刚需,显著提升问题发现效率
- 具备明确的 warning/critical 分级机制,减少无效报警
Areas to improve
-
触发描述过于简略 Reported severity: Minor
description 字段仅写'日志异常检测',未体现具体触发条件或场景
Recommendation: 建议补充具体触发场景,如'当需要监控应用日志错误率异常时',提升触发精准度
Highlights
- 文档结构完整,包含适用场景、功能说明、输入参数、运行流程、输出格式等
- 提供了快速体验版和产品化增强版的完整路径,便于用户理解和使用
Highlights
- 依赖内置能力 filesystem 和 telegram,来源明确
- 有完善的失败处理机制(日志为空、基线不足)和风险控制措施(日志脱敏)
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Translation pending; see source documentation.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.