Created
February 12, 2015 18:55
-
-
Save willejs/e06e9812d663668fb3fb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
log_format logstash_json '{ "@timestamp": "$time_iso8601", ' | |
'"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_referrer": "$http_referer", ' | |
'"http_cookie": "$http_cookie", ' | |
'"upstream_status": "$upstream_status", ' | |
'"upstream_response_time": "$upstream_response_time", ' | |
'"http_user_agent": "$http_user_agent" }'; | |
access_log /var/log/nginx/access.json logstash_json buffer=32k; | |
error_log /var/log/nginx/error.log warn; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment