Regex fluentd和nginx访问日志格式
如何在fluentd中为以下nginx访问日志格式编写正则表达式Regex fluentd和nginx访问日志格式,regex,nginx,
elasticsearch,kibana,fluentd,Regex,Nginx,
elasticsearch,Kibana,Fluentd,如何在fluentd中为以下nginx访问日志格式编写正则表达式 log_format main '$remote_addr - $remote_user [$time_local] $request ' '"$status" $body_bytes_sent "$http_referer" ' '"$http_HOST" $HOST ' '"$htt
log_format main '$remote_addr - $remote_user [$time_local] $request '
'"$status" $body_bytes_sent "$http_referer" '
'"$http_HOST" $HOST '
'"$http_user_agent" "$http_x_forwarded_for" '
'upstream_response_time $upstream_response_time '
'upstream_addr $upstream_addr '
'msec $msec request_time $request_time';
这对我来说很容易
该模块通过fluentd udp插件实时向fluentd发送访问日志,日志格式为json,您可以在fluentd中获取所有日志变量。因此,不欢迎使用链接仅回答。你能提供你链接到的内容的摘录吗?谢谢,但是我现在不能重新编译nginx,我需要正则表达式作为我的日志格式。