What is it?

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.

It provides fast and valuable HTTP statistics for system administrators that require a visual server report on the fly.

類似 Awstats,但 GoAccess 計算真的比較快,安裝設定也滿方便的

安裝

相關套件

yum install glib2-devel ncurses-devel geoip-devel

下載編譯

wget https://tar.goaccess.io/goaccess-1.2.tar.gz
tar -xzvf goaccess-1.2.tar.gz
cd goaccess-1.2/
./configure --enable-utf8 --enable-geoip=legacy
make
#make install # 不一定要安裝,假如臨時使用的話,透過 /root/goaccess-1.2/goaccess 執行

如何使用

console 畫面

goaccess access_log --log-format=COMBINED

參數說明

--log-format=COMBINED 適用 apache

靜態 HTML 畫面

goaccess access_log --log-format=COMBINED -o /var/www/html/goaccess.html

動態 HTML 畫面 (背景執行適用)

goaccess access_log --log-format=COMBINED -o /var/www/html/goaccess.html --real-time-html --daemonize

也可以 tail

tail -f access_log | goaccess --log-format=COMBINED

已可以多檔案了

goaccess access_log.1 access_log --log-format=COMBINED

其它

Related posts 相關文章
apache httpd 2.4.58 有些安全性更新
More...
Apache 有 path traversal 目錄遍歷的漏洞
More...
CentOS7 透過 systemd 自動讓服務 restart 重啟
More...
用 GoAccess 即時分析 IIS Access Log
More...

作者

留言

撰寫回覆或留言

發佈留言必須填寫的電子郵件地址不會公開。