Goaccess: NginX 自定义默认访问日志问题

创建于 2017-03-27  ·  3评论  ·  资料来源: allinurl/goaccess

嗨伙计

我在这里敲我的头,因为我无法在 goaccess 中获得 Easy Engine 默认的 NginX 日志来格式化。 nginx.conf:

        # Log format Settings
        log_format rt_cache '$remote_addr $upstream_response_time $upstream_cache_status [$time_local] '
        '$http_host "$request" $status $body_bytes_sent '
        '"$http_referer" "$http_user_agent"';

实际输出:

66.249.79.119 - - [27/Mar/2017:07:51:28 -0400] www.argonon.com "GET /news/page/3/ HTTP/1.1" 301 178 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
10.1.6.251 0.618 - [27/Mar/2017:07:51:49 -0400] argonon.com "GET /2012/04/30/leopard-films-ground-breaking-new-documentary-series-starts-today-monday-30th-april-11am-bbc1/ HTTP/1.1" 200 7978 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"

标准日志阅读器都不起作用,我的最后一次尝试是:
时间格式 %H:%M:%S
日期格式 %d/%b/%Y
日志格式 %h - %^ [%d:%t %^] "%r" %s %b "%R" "%u" %T "%^"

这给出了错误:

Token 'ET' doesn't match specifier '%s'
Token 'ET' doesn't match specifier '%s'
Token 'ET' doesn't match specifier '%s'
Token '[27/Mar/2017' doesn't match specifier '%d'
Token 'ET' doesn't match specifier '%s'
Token 'ET' doesn't match specifier '%s'
Token '[27/Mar/2017' doesn't match specifier '%d'
Token 'ET' doesn't match specifier '%s'
Token '[27/Mar/2017' doesn't match specifier '%d'
Token '[27/Mar/2017' doesn't match specifier '%d'

Format Errors - Verify your log/date/time format

帮助,非常请,樱桃在上面。

你们有没有选项可以将 EasyEngine NginX 默认登录添加到构建中?

lodattime format question

所有3条评论

这应该这样做:

%h %^[%d:%t %^] %v "%r" %s %b "%R" "%u"
%d/%b/%Y
%T

完美运行。

由于这是 NginX 的任何 Easy Engine 设置的默认设置,是否可以在默认日志记录选项中添加它?

你救了我的一天!

此页面是否有帮助?
0 / 5 - 0 等级

相关问题

SergioDG-YCC picture SergioDG-YCC  ·  3评论

vivekkrish picture vivekkrish  ·  3评论

ArunDahiya1 picture ArunDahiya1  ·  3评论

DestinyWang picture DestinyWang  ·  3评论

Gill-Bates picture Gill-Bates  ·  3评论