标签:eth log json bytes Nginx访问日志 res iso remote 日志
#nginx访问日志的格式,方便使用filebeat通过json的格式收集和推送到logstash解析;log_format elk ‘{"@timestamp": "$time_iso8601", ‘
‘"request_id": "$request_id", ‘
‘"remote_addr": "$remote_addr", ‘
‘"remote_user": "$remote_user", ‘
‘"body_bytes_sent": $body_bytes_sent, ‘
‘"request_time": $request_time, ‘
‘"status": $status, ‘
‘"request": "$request", ‘
‘"request_method": "$request_method", ‘
‘"http_host": "$http_host", ‘
‘"http_referrer": "$http_referer", ‘
‘"http_user_agent": "$http_user_agent", ‘
‘"upstream_addr": "$upstream_addr", ‘
‘"upstream_status": "$upstream_status", ‘
‘"upstream_response_time": "$upstream_response_time", ‘
‘"X-Forwarded-For": "$http_x_forwarded_for"}‘;
标签:eth log json bytes Nginx访问日志 res iso remote 日志
原文地址:http://blog.51cto.com/agent/2314496