Mind The GAp: Striking out on my own with GoAccess for server log analytics
In which log-parsing and ncurses offer a soothing balm to the modern condition.Posted on May 1, 2017
I’ll be honest, I didn’t look for very long because one of the first links I found was goaccess - which so far works really well. You can feed it log files, and browse them via an ncurses interface, or generate html, or have it host a real-time web page for you. It can parse plenty of standard log formats out of the box, or you can teach it about your own specific logging output. It was also nice to realise that it was included in the ubuntu repos so it was just an apt-get away.
NB: The version currently included in the ubuntu repos has a slightly different command line interface than that described on their website, so make sure to check the manpages for your installed version, if you install it that way.
I don’t need the adrenaline rush of a real time dashboard, so I just set it up with a simple cron job that generates html:
zcat -f access.* | goaccess > report.html
I’d be lying if I said I didn’t enjoy ssh’ing from time to time and running the ncurses interface as well.