← 返回 Skills 市场
laolaoqi

Log Analyzer

作者 new · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
65
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install laolaoqi-log-analyzer
功能描述
Analyze server logs for error patterns, IP frequency, time-based analysis, and alert generation. Use when a user needs log file analysis, error pattern detec...
使用说明 (SKILL.md)

Log Analyzer

Script

scripts/log-analyzer.sh — the single entry point for all analyses.

The script is self-contained, works on any Linux system with standard tools (grep, awk, sort, uniq), and handles both file and piped input.

Quick Start

Analyze /var/log/syslog with all checks:

bash scripts/log-analyzer.sh -f /var/log/syslog --all

Or pipe logs directly:

journalctl -u nginx --since "24 hours ago" | bash scripts/log-analyzer.sh --all

Options

Option Description
-f \x3Cfile> Log file to analyze (use - for stdin)
-p \x3Cpattern> Custom error pattern (default: error/i, fail/i, warn/i, critical/i, exception)
-t \x3Chours> Time window in hours (default: 24)
--errors Find top error messages and their frequency
--time-analysis Group errors by time period (hourly/daily)
--ips Analyze IP frequency from log entries
--spikes Identify unusual patterns and spikes
--all Run all analyses (default if no option given)
--help Show this help message

Analysis Modules

Error Patterns (--errors)

Scans for configured error patterns, groups and sorts by frequency, shows the top most common error messages.

Time-based Analysis (--time-analysis)

Groups errors into hourly and daily buckets to show when issues occur most frequently.

IP Frequency (--ips)

Extracts IPv4 addresses from log entries, counts occurrences, and shows the top sources.

Spike Detection (--spikes)

Compares error counts per time bucket against the average. Flags buckets that exceed 2x the average as potential anomalies.

Common Findings & Recommendations

  • Repeated errors from the same source: Check application/service health; consider rate limiting or restart
  • Time-based spikes: Correlate with cron jobs, deployments, or traffic patterns at the flagged times
  • High-frequency IPs: Could indicate brute-force attempts, scrapers, or DDoS — consider firewall rules or fail2ban
  • New error patterns appearing: Recent changes or deployments may have introduced regressions
  • Sudden increase in warnings: Often precedes critical failures — investigate proactively

Notes

  • Piped input reads from stdin; use -f - explicitly when piping
  • For large log files (>100MB), consider reducing the time window with -t or pre-filtering with grep
  • Time-based analysis expects standard syslog date formats (RFC 3164 or RFC 5424); custom formats may need adjustment
  • IP detection uses a standard IPv4 regex — IPv6 is not currently supported
  • Works without root for user-owned log files; system logs may require sudo
安全使用建议
This looks like a benign local log-analysis skill. Before using it, confirm the file path or piped command is the log source you intended, avoid sudo unless required, and remember that logs can include IP addresses, usernames, errors, or other operational details that may appear in the analysis output.
功能分析
Type: OpenClaw Skill Name: laolaoqi-log-analyzer Version: 1.0.0 The log-analyzer skill is a legitimate utility for parsing and summarizing server logs. The bash script (scripts/log-analyzer.sh) uses standard Unix tools like grep, awk, and sed to identify error patterns, calculate IP frequencies, and detect spikes without any evidence of malicious behavior, data exfiltration, or unauthorized access.
能力评估
Purpose & Capability
The described purpose—analyzing log files for errors, IP frequency, time patterns, and spikes—matches the documented shell script behavior.
Instruction Scope
The skill is meant to run a local shell script against user-selected files or stdin; users should only point it at logs they intend to analyze because logs can contain sensitive operational data.
Install Mechanism
There is no install spec, but the skill includes a shell script and depends on local Unix tools such as bash, grep, awk, sort, uniq, sed, wc, mktemp, and bc. This is purpose-aligned but not fully reflected in the registry requirements.
Credentials
The script performs local text processing and does not show network calls, external uploads, or unrelated system access in the provided artifacts.
Persistence & Privilege
The script creates a temporary file and removes it on exit; SKILL.md notes that system logs may require sudo, so users should avoid elevated access unless necessary.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install laolaoqi-log-analyzer
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /laolaoqi-log-analyzer 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of log-analyzer. - Analyze server logs for error patterns, IP frequency, time-based analysis, and anomaly/spike detection. - Supports syslog and custom log files, handling both file and piped input. - Provides options for custom error patterns, time window, and individual or combined analysis modules. - Uses standard Linux tools (grep, awk, sort, uniq); no external dependencies. - Includes recommendations for interpreting findings and best practices for large log files.
元数据
Slug laolaoqi-log-analyzer
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Log Analyzer 是什么?

Analyze server logs for error patterns, IP frequency, time-based analysis, and alert generation. Use when a user needs log file analysis, error pattern detec... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 65 次。

如何安装 Log Analyzer?

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

Log Analyzer 是免费的吗?

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

Log Analyzer 支持哪些平台?

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

谁开发了 Log Analyzer?

由 new(@laolaoqi)开发并维护,当前版本 v1.0.0。

💬 留言讨论