Build a Server Access Log Analyzer
45 min · Beginner
Need help? Ask a tutor on WhatsApp (opens in a new tab)Backend engineering teams rely on automated log analysis to monitor system health, detect spikes in HTTP 500 errors, identify abusive client IPs, and optimize endpoint latencies.
What you'll build
A server log parsing and telemetry analyzer in Python. It processes raw web server access log lines, categorizes HTTP response status codes, identifies top requesting client IPs, and reports system health metrics.
Malformed or corrupted log lines are identified and skipped safely without interrupting the log processing pipeline.
=== Backend Telemetry Log Analyzer === Processing 6 server log entries... [LOG HEALTH DASHBOARD] Total Requests Processed: 6 Successful (2xx): 4 (66.7%) Client Errors (4xx): 1 (16.7%) Server Errors (5xx): 1 (16.7%) Average Response Time: 175.85 ms [TOP CLIENT IPS] 1. 192.168.1.10 - 3 requests 2. 10.0.0.45 - 2 requests 3. 172.16.0.5 - 1 requests [SYSTEM STATUS]: ATTENTION - Server error rate exceeds 10% threshold!
Requirements
- 1Parse multi-line access logs formatted with IP, timestamp, method, endpoint, status, and duration.
- 2Extract fields accurately using string methods (
split,strip). - 3Classify status codes into 2xx (Success), 4xx (Client Error), and 5xx (Server Error) groups.
- 4Count request frequencies per IP address to identify top traffic sources.
- 5Calculate average request duration and compute overall server error rate percentages.
- 6Print an executive health dashboard reporting status breakdowns and warning alerts.
Milestones
0/4 done · commit and push after each oneDefine sample log records and line parser
Represent raw server access logs and create a single-line extraction helper.
Aggregate HTTP status codes and compute error rates
Tally 2xx, 4xx, and 5xx responses and calculate percentage metrics.
Rank top client IP addresses
Count request volume by client IP and rank the most active clients.
Generate executive dashboard report
Print an aligned terminal dashboard summarizing system telemetry.
Build it in your own GitHub repository and push after each milestone. When everything works, mark the project as complete.
Extra challenges (optional)
Do any you like, each on its own branch, so your main project keeps working.
Flag any request taking more than 300 ms with a [LATENCY WARNING] indicator in the log summary.· easy
Filter and display logs specifically by a user-provided HTTP method (e.g. show only POST requests).· medium
Identify potential brute-force attacks by detecting any single IP making more than 3 failed requests.· hard
Solution
Opens when you add your repository link.
Finish up
Mark complete & continue
Next: Build an Asset Portfolio Tracker