server-log-analyzer

v1.0.0

Analyzes server log files to detect problems, extract performance metrics, and provide troubleshooting insights. Triggers: "analyze logs", "log analysis", "c...

0· 101· 1 versions· 0 current· 0 all-time· Updated 11h ago· MIT-0

Install

openclaw skills install server-log-analyzer

Server Log Analyzer

Analyzes server log files to identify problems, extract performance metrics, and provide actionable insights for troubleshooting.

Supported Log Formats

[YYYY/MM/DD HH:MM:SS] module.path LEVEL line_number: message

Example:

[2026/04/15 12:08:03] sanhai.flow.linear_data_flow INFO 127: flow_id:2044266474671067136 - Worker completed

Usage

Basic Analysis

python scripts/log_analyzer.py /path/to/your/logfile.log

JSON Output (for automation)

python scripts/log_analyzer.py /path/to/your/logfile.log --json

Features

1. Log Statistics

  • Counts INFO, WARNING, ERROR, CRITICAL entries
  • Shows time range and duration
  • Module-level statistics

2. Problem Detection

Automatically detects common issues:

SeverityIssue TypeDetection Pattern
HighDatabase failures[DB] update/insert failed
HighMissing componentshas no corrector
MediumNotification failuresemail notification failed
MediumClassification errorspaper type error
LowID recognition failuresinvalid student number

3. Python Exception Tracking

Extracts Python traceback information:

  • Exception type and message
  • Source file locations (filters out framework code)
  • Key code location in your project

4. Performance Metrics

  • TPS (Tasks Per Second)
  • Batch processing time
  • Worker-level timing

Output Sections

SectionContent
SummaryLog level counts, time range
ExceptionsPython exceptions (highest priority)
PerformanceTPS, processing time
IssuesProblems by severity
ModulesModule call frequency

Performance Thresholds

MetricNormalWarningCritical
TPS50-300<20<10
Batch Time<2s>5s>10s

Notes

  • Large log files (>10MB) may take longer to process
  • Exception tracking filters out framework/library code
  • Results are sorted by severity (exceptions first)

Version tags

latestvk97ewcs5jttq1xkc7a4bq1en5h85bww7