- 下載
apt install goaccess
- 使用goaccess進行監控
LANG="en_US.UTF-8" bash -c 'goaccess logs/access.log -o html/report.html --real-time-html --time-format='%H:%M:%S' --date-format='%d/%b/%Y' --log-format=COMBINED '
WebSocket server ready to accept new client connections
注意點
- 命令行加&後臺運行
- 需打開7890端口
- 日誌分割也可以用goaccess做分析,因爲他的分析結果存儲在內存中
- 注意log格式與log format一致