一.简介
1.goaccess主要用于分析apache和nginx日志,功能十分强大。
二。安装
$ wget https://tar.goaccess.io/goaccess-1.4.tar.gz
$ tar -xzvf goaccess-1.4.tar.gz
$ cd goaccess-1.4/
$ ./configure --enable-utf8 --enable-geoip=legacy
$ make
# make install
三。用goaccess分析nginx的日志
[root@server1 ~]# cd /usr/local/openresty/nginx/logs/
[root@server1 logs]# ls
access.log error.log nginx.pid
[root@server1 logs]# goaccess -c access.log 命令行的显示
网页分析日志
[root@server1 logs]# goaccess access.log -o ../html/report.html --log-format=COMBINED --real-time-html
Parsing... [49,142] [49,142/s]
WebSocket server ready to accept new client connections