RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
nginx日志使用json输出

在nginx中使用json格式输出日志记录

从事郑州服务器托管,服务器租用,云主机,网络空间,空间域名,CDN,网络代维等服务。

log_format json '{ "time_local": "$time_local", '
'"remote_addr": "$remote_addr", '
'"referer": "$http_referer", '
'"request": "$request", '
'"status": $status, '
'"bytes": $body_bytes_sent, '
'"agent": "$http_user_agent", '
'"x_forwarded": "$http_x_forwarded_for", '
'"up_addr": "$upstream_addr",'
'"up_host": "$upstream_http_host",'
'"upstream_time": "$upstream_response_time",'
'"request_time": "$request_time"'
' }';

access_log /var/log/nginx/access.log json;

对于使用filebeat来收集日志很重要。


当前题目:nginx日志使用json输出
分享网址:http://sczitong.cn/article/jhghii.html