A CLI-based Python tool that analyzes Linux-style log files and produces useful system and network insights.
This project was built step by step to simulate real-world DevOps / SRE log analysis and troubleshooting scenarios.
- Reads log files from CLI arguments
- Counts total requests
- Identifies unique and most frequent IP addresses
- Analyzes HTTP status codes (2xx / 4xx / 5xx)
- Separates error logs (4xx and 5xx)
- Generates a clean summary report
log_analyzer/ │ ├── logs/ │ └── sample.log │ ├── analyzer.py ├── utils.py ├── README.md ├── requirements.txt └── .gitignore
- Python 3.10+
python analyzer.py logs/sample.log
## 📊 Example Output
--- LOG ANALYSIS REPORT ---
Total requests: 5
Unique IPs: 3
Most common IP: 192.168.1.10 (3 requests)
2xx Success: 3
4xx Client Errors: 1
5xx Server Errors: 1
---------------------------
What This Project Demonstrates
Practical Python usage for system tooling
Log analysis and troubleshooting mindset
CLI tool development
Error handling and clean output design