Goaccess (<a href="https://github.com/allinurl/goaccess">https://github.com/allinurl/goaccess</a>) does this in real time and has been very stable for well over a decade.
Found it much easier to just used structured logs and slice them with [angle grinder](<a href="https://github.com/rcoh/angle-grinder">https://github.com/rcoh/angle-grinder</a>)
This is cool. I just installed goaccess and was using that to look at the nginx logs but this is also neat. I like post-hoc analysis of these things rather than injecting JS just because it's easier for me to manage for my personal sites. Thank you.
ngxtop is also very useful for providing real-time metrics:<p><a href="https://github.com/lebinh/ngxtop">https://github.com/lebinh/ngxtop</a>
I used something similar in the past for website analytics but came to realize that javascript based tracking is more useful for my use case of understanding how people use my website.<p>JS tracking leaves out most bots as well. They were a nuisance with this method.
It is not for production use because:<p>"Whenever the program is run, it looks for the nginx access.logs, parses them and stores the data into an SQLite DB. "
...
"The command line arguments express a filtering criteria, used to build the SQL query that counts the requests."