← 返回 Skills 市场
charlie-morrison

Logfile Analyzer

作者 charlie-morrison · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
87
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install logfile-analyzer
功能描述
Analyze application logs to produce actionable error digests with pattern detection, severity classification, trend analysis, and remediation recommendations...
使用说明 (SKILL.md)

Log Analyzer

Parse application logs into actionable error digests with pattern grouping, severity classification, trend detection, and remediation recommendations.

Quick Start

# Analyze a single log file
python3 scripts/analyze_logs.py /var/log/app.log

# Analyze all logs in a directory
python3 scripts/analyze_logs.py /var/log/myapp/

# Last 24 hours only, errors and above
python3 scripts/analyze_logs.py /var/log/app.log --since 24h --severity error

# JSON output for programmatic use
python3 scripts/analyze_logs.py /var/log/app.log --output json

# Markdown report with trends
python3 scripts/analyze_logs.py /var/log/app.log --output markdown --trends

# Ignore noisy patterns
python3 scripts/analyze_logs.py /var/log/app.log --ignore "healthcheck" --ignore "GET /favicon"

Supported Formats (Auto-Detected)

  • JSON structured — Bunyan, Winston, Pino, structlog, any {"level": ..., "msg": ...} format
  • Syslog — RFC 3164 (Mar 28 02:31:00 host service: msg)
  • Apache/Nginx access — Combined log format
  • Nginx error2026/03/28 02:31:00 [error] ...
  • Python tracebacks — Multi-line traceback collection
  • Docker — ISO 8601 timestamps with container output
  • Generic timestamped[2026-03-28 02:31:00] LEVEL: message

Force format with --format \x3Cname> if auto-detection fails.

What It Does

  1. Parses log entries with format auto-detection
  2. Classifies severity (TRACE → DEBUG → INFO → WARN → ERROR → FATAL)
  3. Normalizes messages (replaces UUIDs, IPs, timestamps, paths with placeholders)
  4. Groups similar errors by fingerprint to find recurring patterns
  5. Ranks by severity and frequency
  6. Detects trends with --trends (hourly frequency buckets)
  7. Recommends fixes for 15+ known error patterns (OOM, connection refused, disk full, timeouts, SSL issues, rate limits, etc.)

Options

Flag Default Description
--format auto Force log format
--since all Time filter (1h, 24h, 7d, or ISO date)
--severity warn Minimum severity to report
--top 20 Number of top patterns to show
--output text Output format: text, json, markdown
--trends off Show hourly frequency trends
--ignore none Regex patterns to exclude (repeatable)
-q off Summary only, skip individual entries

Exit Codes

  • 0 — No errors found
  • 1 — Errors found (warn/error level)
  • 2 — Fatal/critical entries found

Use in CI/CD pipelines to fail builds on log errors.

Workflow

Incident Investigation

  1. Run with --since 1h --severity error --trends to see recent errors with frequency
  2. Review top patterns — the most frequent errors are usually the root cause
  3. Check recommendations for known patterns
  4. Use --output json to feed into monitoring dashboards

Periodic Health Check

  1. Run with --since 24h --output markdown for a daily report
  2. Compare pattern counts across days to spot trends
  3. Set up as cron job for automated daily digests

Deep Dive

  1. Run with --severity debug to see full picture
  2. Use --ignore to filter out known noise
  3. Check references/error-patterns.md for detailed remediation steps on specific error types

Error Pattern Reference

For detailed remediation guidance on specific error types (memory, network, database, SSL, etc.), see references/error-patterns.md.

安全使用建议
This appears to be a straightforward local log analyzer, but consider the following before installing or running it: 1) Logs often contain sensitive data (API keys, PII, auth tokens) — run the tool only on files you intend to analyze and preferably on a copy or in a sandbox. 2) Review the included script (scripts/analyze_logs.py) yourself — it runs locally and will read whatever paths you pass to it. 3) The skill has no provenance information (no homepage) and is sold/packaged by an unknown owner — if this matters for your environment, prefer tools from known sources or audit the code. 4) For automated runs (cron/CI), give the process least privilege (read-only access to specific log directories) and avoid sending raw outputs to external endpoints unless you control them.
功能分析
Type: OpenClaw Skill Name: logfile-analyzer Version: 1.0.0 The logfile-analyzer skill is a legitimate tool designed to parse, group, and analyze application logs for error patterns. The core logic in scripts/analyze_logs.py is well-structured, uses only Python standard libraries, and contains no network calls, obfuscation, or unauthorized file access. It implements robust log format auto-detection and provides actionable remediation advice based on common error strings (e.g., OOM, connection timeouts) defined in references/error-patterns.md.
能力标签
cryptorequires-oauth-token
能力评估
Purpose & Capability
Name/description match the included Python analyzer (scripts/analyze_logs.py). The script and SKILL.md focus on parsing log files, grouping errors, trend detection, and recommendations — all coherent with a logfile analyzer. No unrelated binaries, environment variables, or cloud credentials are requested.
Instruction Scope
Instructions direct the agent/user to run the included script against local log files or directories (examples use /var/log). This is expected for the stated purpose. Note: the tool will read any file paths you provide (logs can contain sensitive data), so feeding it arbitrary system paths grants it access to those files.
Install Mechanism
No install spec — instruction-only with an included pure-Python (stdlib) script. No downloads, no external package registry dependencies, and no archives to extract.
Credentials
The skill declares no required environment variables or credentials and the included script imports only stdlib modules. There are no obvious requests for unrelated secrets or external service tokens.
Persistence & Privilege
always:false and no install behavior that modifies other skills or system-wide settings. The skill does not request permanent presence or privileged agent-wide configuration.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install logfile-analyzer
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /logfile-analyzer 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release
元数据
Slug logfile-analyzer
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Logfile Analyzer 是什么?

Analyze application logs to produce actionable error digests with pattern detection, severity classification, trend analysis, and remediation recommendations... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 87 次。

如何安装 Logfile Analyzer?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install logfile-analyzer」即可一键安装,无需额外配置。

Logfile Analyzer 是免费的吗?

是的,Logfile Analyzer 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Logfile Analyzer 支持哪些平台?

Logfile Analyzer 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Logfile Analyzer?

由 charlie-morrison(@charlie-morrison)开发并维护,当前版本 v1.0.0。

💬 留言讨论