I'm looking for a simple tool to analyze my NGINX logs on my macbook. I want to be able to get some basic stats including bot access and also be able to sort/filter the logs to find out what happened right before the server crashed.
You can set up logrotate for nginx, in this way you can maintain logs for 30 days or more as per your requirements !
You can remove access. log as root user, or using sudo.
The access log can be enabled either in http , server , or location directives block. By default, the access log is globally enabled in the http directive inside the main Nginx configuration file. For better readability, it is recommended to set a separate access log file for each server block.
You may try with GoAccess; free and open source console based. It may output an HTML report too.
I've come across visitors. It's written in C and is pretty fast.
It lacks goaccess' cool ncruses interface. It only outputs html. It does the job, though.
Edit: It can also output human-readable text reports:
visitors access.log | less
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With