`incident-log-summary` is a read-only Python CLI for quick incident log review. It scans a local Linux system log or application log and groups configured operational patterns by severity, count, timestamps, and sample lines.
The tool is meant for first-pass triage and incident notes. It does not replace full log search, alert correlation, service-specific runbooks, or review by an operator who understands the affected platform.
## When To Use
- During incident response when a collected log file needs a fast pattern summary.
- Before attaching evidence to an incident, problem, or change ticket.
- When comparing whether a log contains obvious storage, memory, service, TLS, HTTP, or connectivity failures.
- When JSON output is useful for later local automation.
## What It Does Not Do
- It does not read remote systems.
- It does not modify logs or system state.
- It does not query ELK, Zabbix, SIEM, journald, or application APIs.
- It does not prove root cause.
- It does not classify every possible vendor or application error.
- It does not treat sanitized examples as production validation.
## Supported Input
- One local text log file provided with `--file`.
- UTF-8 input is expected. Invalid byte sequences are replaced during read so review can continue.
- Empty, missing, unreadable, or non-file paths are rejected with exit code `2`.
## Supported Patterns
Critical patterns:
-`CRITICAL`
-`FATAL`
-`panic`
-`kernel panic`
-`no space left on device`
-`out of memory`
-`killed process`
-`read-only file system`
-`segmentation fault`
-`segfault`
-`certificate expired`
-`TLS handshake failed`
-`SSLHandshakeException`
-`database unavailable`
-`HTTP 500`
-`HTTP 502`
-`HTTP 503`
-`HTTP 504`
Warning patterns:
-`ERROR`
-`failed`
-`failure`
-`timeout`
-`connection refused`
-`connection reset`
-`permission denied`
-`authentication failed`
-`denied`
-`unavailable`
-`service restart`
-`retrying`
By default matching is case-sensitive. Use `--ignore-case` for case-insensitive matching across all configured patterns.
## Timestamp Handling
The scanner attempts to parse:
-`2026-05-11 10:15:30`
-`2026-05-11T10:15:30`
-`May 11 10:15:30`
Timestamp parsing is best-effort. Lines with unparseable timestamps are still analyzed, and date filtering keeps those lines by default so potentially important findings are not silently discarded.
Syslog-style timestamps do not include a year. For filtering, the tool uses the year from `--since` when present, otherwise the current local year.