Skip to content

Instantly share code, notes, and snippets.

@1901
Last active October 14, 2019 10:15
Show Gist options
  • Select an option

  • Save 1901/1286e4c3f105c2fa8c34f0b6699c0177 to your computer and use it in GitHub Desktop.

Select an option

Save 1901/1286e4c3f105c2fa8c34f0b6699c0177 to your computer and use it in GitHub Desktop.
[nginx log_format config] #nginx #config
log_format main '$remote_addr [$time_local][$host] '
'request="$request" '
'request_length=$request_length '
'status=$status bytes_sent=$bytes_sent '
'body_bytes_sent=$body_bytes_sent '
'referer=$http_referer '
'user_agent="$http_user_agent" '
'upstream_addr=$upstream_addr '
'upstream_status=$upstream_status '
'request_time=$request_time '
'upstream_response_time=$upstream_response_time '
'upstream_connect_time=$upstream_connect_time '
'upstream_header_time=$upstream_header_time';
# ref: https://www.nginx.com/blog/using-nginx-logging-for-application-performance-monitoring/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment