【笔记】GoAccess学习笔记

前言

GoAccess is an open source real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems or through your browser.(官网

下载依赖

1
2
3
wget https://tar.goaccess.io/goaccess-1.9.3.tar.gz
tar -xzvf goaccess-1.9.3.tar.gz
cd goaccess-1.9.3/

编译并安装

1
2
3
./configure --enable-utf8 --enable-geoip=mmdb
make
make install

分析日志

<file>.log:指定日志文件
<file>.html:指定输出的报告文件
--real-time-html:持续分析日志,只要日志文件发生更改,就输出新的报告文件覆盖旧的报告文件

1
goaccess -f <file>.log --log-format=COMBINED > <file>.html

完成