简体   繁体   English

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

[英]How to monitor nginx error logs with Goaccess?

Most goaccess examples are for monitoring access logs.大多数 goaccess 示例用于监控访问日志。 I want to monitor error logs with goaceess.我想用 goaceess 监控错误日志。

My error logs are of the following format:我的错误日志格式如下:

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"

Right now I am using the following log format:现在我使用以下日志格式:

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

However, the goaccess report is not generating a useful output.但是,goaccess 报告没有生成有用的输出。 I would like to see the details of each type of error in the report.我想在报告中查看每种类型错误的详细信息。

在我的服务器中,这是有效的 Regexp

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM