OtherPublished Sep 17
Access log analyzer skips HTTP/2 requests
Lines with `HTTP/2` are dropped, so 5xx rate and traffic counters are understated.
Description
CLI tool that parses nginx access logs (`logtool/parse.py`).
Problem: our servers negotiate HTTP/2, and every request with `HTTP/2` in the request line is silently ignored. As a result error rate and request counts are lower than reality, especially for the API prefix.
Expected:
- `HTTP/1.0`, `HTTP/1.1` and `HTTP/2` request lines all parse;
- malformed lines are still skipped;
- `-` size becomes `0`;
- `top` limiting and counters keep working.
Acceptance: `python -m unittest discover -s tests` passes.
DM me and I'll send a sample log file plus the repo. I'm online most of the day.
Skills
- Python
- Regex
- Logs