安装 goaccess
yum install -y goaccess
生成html时候发送错误
[root@idfsgc2jyZ ~]# goaccess -d -f 20170211_02.txt -a -p /root/mygoaccess.conf > /web/02/gouwu/log/index.html
GoAccess - version 0.9.3 - Aug 28 2015 08:55:01
Config file: /root/mygoaccess.conf
Fatal error has occurred
Error occured at: src/parser.c - verify_formats - 1761
No time format was found on your conf file.
编辑 /root/mygoaccess.conf
vi /root/mygoaccess.conf
time-format %T
date_format %d/%b/%Y:%T %z
log_format %h - - [%d] "%r" %s %b "%R" "%u"
保存即可
兼容你的日志格式可以自己写
log_format %h %^[%d:%t %^] "%r" %s %b "%R" "%u"
date_format %d/%b/%Y
time-format %H:%M:%S