如何使用Goaccess监视nginx错误日志?

问题描述 投票:0回答:1

大多数goaccess示例都用于监视访问日志。我想用goaceess监视error日志。

我的错误日志的格式如下:

2020/02/05 09:23:08 [crit] 9711#9711: *6 SSL_do_handshake() failed (SSL: error:1420918C:SSL routines:tls_early_post_process_client_hello:version too low) while SSL handshaking, client: X.X.X.X, server: 0.0.0.0:443
2020/02/05 09:38:21 [error] 10106#10106: *3 directory index of "/var/www/example/public_html/" is forbidden, client: 162.158.166.216, server: example.com, request: "GET /nginx-reports/ HTTP/1.1", host: "example.com"

现在,我正在使用以下日志格式:

log-format %d %t %^, client: %h, server: %^, request: "%r", host: "%v"

但是,goaccess报告未生成有用的输出。我想在报告中查看每种错误的详细信息。

nginx error-log goaccess
1个回答
0
投票

在我的服务器上,这是正常工作的Regexp

log-format %d %t %^, client: %h, server: %^, request: "%r", host: "%v", referrer: "%R"
© www.soinside.com 2019 - 2024. All rights reserved.