nginx 配置:
http {
include mime.types;
default_type application/octet-stream;
log_format main '$http_host $server_addr $remote_addr [$time_local] "$request" '
'$request_body $status $body_bytes_sent "$http_referer" "$http_user_agent" '
'$request_time $upstream_response_time';
#send the log to syslog and file.
access_log /var/log/nginx/access.log main;
# pre 1.5.x
error_log /var/log/nginx/error.log;
nginx 服务器rsyslog配置:
$ModLoad imuxsock # provides support for local system logging (e.g. via logger command)
$ModLoad imklog # provides kernel logging support (previously done by rklogd)
module(load="imfile" PollingInterval="5")
$ModLoad imtcp
$InputTCPServerRun 514
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
$IncludeConfig /etc/rsyslog.d/*.conf
*.info;mail.none;authpriv.none;cron.no
nginx grok 正则错误的输出情况
最新推荐文章于 2023-07-05 13:13:49 发布