Andy's Blog » nginx 日志分析, nginx日志分析, goaccess, nginx log 分析, goaccess nginx, Nginx日志分析工具, 日志分析工具, centos goaccess, access log 分析, goaccess geoip, nginx log parser, access log 分析工具, nginx log, access.log 解析, nginx access.log分析, access_nginx.log-20180907.gz, nginx网站日志分析工具, access日志分析软件 » 最佳 Nginx 日志分析工具 GoAccess - Best Nginx log analyzer

最佳 Nginx 日志分析工具 GoAccess - Best Nginx log analyzer

非常小又精悍的 Nginx 日志分析工具 GoAccess,今天在 CentOS VPS 上安装测试了一番

可以用 XShell 或 Putty 上去命令查看,也可以生成 html 报告,先看图


Main scrollable dashboard

Operating Systems module/report

Browsers module/report. All reports are searchable

Main scrollable window/report

Hosts module/report - Reverse DNS & IP Geolocation

Full HTML report

下面记录一下 GoAccess 在 CentOS 上的安装方法:
1. 需要安装 GeoIP, ncurses, glib2, 一句搞定
#yum -y install glib2 glib2-devel ncurses ncurses-devel GeoIP GeoIP-devel

2. 下载 GoAccess 解压编译安装

# wget
# tar zxvf goaccess-0.5.tar.gz
# cd goaccess-0.5
# ./configure --enable-geoip --enable-utf8
# make && make install
# make clean

3. 好了,试试装好没

# goaccess


GoAccess - 0.5

Usage: goaccess [ -e IP_ADDRESS][ - a ][ - c ]< -f log_file >

The following options can also be supplied to the command:

-f - Path to input log file.
-c - Prompt log/date configuration window.
-a - Enable a List of User-Agents by host.
For faster parsing, don't enable this flag.
-e - Exclude an IP from being counted under the
HOST module. Disabled by default.

Examples can be found by running `man goaccess`.

For more details visit:
GoAccess Copyright (C) 2009-2012 GNU GPL'd, by Gerardo Orellana


4. GoAccess 使用方法
进入 Nginx 日志所在目录


# goaccess -f access.log -c -a

出来图了,日志格式选 NCSA 那项

也可以生成 HTML 报告

goaccess -f /var/log/nginx/access.log -a > report.html

zcat -f /var/log/nginx/access.log* | goaccess -a > report.html


另外:GoAccess 是个日志分析工具,不单单是 Nginx 的日志,支持多种格式

GoAccess 网站:

Incoming search terms:

Tags: nginx, GoAccess, log analyzer, 日志分析