【问题标题】:Please help me for nginx custom log format issue with goacccess请帮助我解决 goaccess 的 nginx 自定义日志格式问题
【发布时间】:2016-03-31 10:03:04
【问题描述】:

请找到我的 nginx 日志输出 (access.log)

182.69.143.120 - - [31/​​Mar/2016:03:10:51 +0530] "GET /api/check_delivery.php?authkey=9450AW2qTKYe453be757c&requestid=36626f6a3530323439383831 HTTP/1.1" control.93 "-msg91.com 404 " "-" "-" "control.msg91.com" "-" to: 10.0.0.62:8080: upstream_response_time 0.003 request_time 0.003

我的 nginx 自定义日志格式:

$remote_addr - $remote_user [$time_local] "$request" $host' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for" "$server_name"';

以及我在 goaccess conf 文件中使用的:

时间格式 %H:%M:%S

日期格式 %d/%b/%Y

log_format %^[%d:%^] "%r" %s %b "%R" "%u" "%^ %h"

运行后我得到以下错误:

GoAccess - 0.9.8 版 - 2016 年 3 月 31 日 14:11:22 配置文件:/usr/local/etc/goaccess.conf

发生了致命错误 错误发生在:src/goaccess.c - main - 1017 没有任何有效的处理。验证您的日期/时间/日志格式。

请帮帮我... 提前致谢

【问题讨论】:

    标签: nginx log-analysis goaccess


    【解决方案1】:

    尝试使用以下日志格式:

    log-format %h %^[%d:%t %^] "%r" %s %b "%R" "%u"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-12-01
      • 1970-01-01
      • 1970-01-01
      • 2021-09-17
      • 1970-01-01
      相关资源
      最近更新 更多