0

我正在阅读goaccess 手册页,但我缺少简单的示例。我有一个具有以下配置的自定义 nginx:

log_format timed_combined '$remote_addr - $remote_user [$time_local] '
    '$ssl_protocol/$ssl_cipher '
    '"$request" $status $body_bytes_sent '
    '"$http_referer" "$http_user_agent" '
    '$request_time $upstream_response_time $pipe';

这是一个示例日志条目:

66.249.76.120 - - [20/Dec/2016:19:04:03 +0100] 
TLSv1.2/ECDHE-RSA-AES128-GCM-SHA256 "GET / HTTP/1.1" 200 27232 
"-" "Mozilla/5.0 (compatible; Googlebot/2.1; 
+http://www.google.com/bot.html)" 0.026 0.026 .

我该如何配置.goaccessrc才能读取该格式?

4

1 回答 1

1

您可以将其添加到您的配置文件或~/.goaccessrc

log-format %h %^[%d:%t %^] %^"%r" %s %b "%R" "%u" %T %^
date-format %d/%b/%Y
time-format %H:%M:%S
于 2016-12-21T03:29:23.020 回答