您的位置:首页 > 运维架构 > Nginx

goaccess nginx 日志分析 错误No time format was found on your conf file.

2017-02-11 10:44 721 查看
版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。 本文链接:https://blog.csdn.net/qq3217494277/article/details/54981114

安装 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  

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: