You didn't really configure nginx logging, nor the sending of the logs in a dedicated database.
You just have the standard logs and you'd like to have an idea of what happened recently.
This program finds and reads the log files (even gzipped), checks their consistency, does some basic analysis and tells you about it in pretty tables in your console, storing and polluting nothing.
That's all.
You need the Rust toolchain. Do
bash
cargo install rhit
Rhit is only tested on linux.
If rhit is on the server, and the logs are at their usual location:
bash
rhit
(you may have to prefix with sudo to read the files in /var/log
)
Tell rhit what files to open:
bash
rhit ~/trav/nginx-logs
Filter on paths:
bash
rhit -p download
Filter on paths with a regular expression:
bash
rhit -p "^/blog/.*broot"
Filter on referer:
bash
rhit -r reddit
You may combine filters: