-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjson_log_format.conf
More file actions
25 lines (25 loc) · 2.04 KB
/
Copy pathjson_log_format.conf
File metadata and controls
25 lines (25 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
log_format json_logs escape=json '{'
'"time_local":"$time_local",'
'"remote_addr": "$remote_addr",' # client IP
'"request":"$request",' # full path no arguments if the request
'"status": "$status",' # response status code
'"request_time":"$request_time",' # request processing time in seconds with msec resolution
'"remote_user": "$remote_user",' # client HTTP username
'"remote_port": "$remote_port",' # client port
'"body_bytes_sent": "$body_bytes_sent",' # the number of body bytes exclude headers sent to a client
'"bytes_sent": "$bytes_sent", ' # the number of bytes sent to a client
'"request_length": "$request_length", ' # request length (including headers and body)
'"connection_requests": "$connection_requests",' # number of requests made in connection
'"http_host": "$http_host", ' # the request Host: header
'"http_referrer":"$http_referer",'
'"upstream": "$upstream_addr", ' # upstream backend server for proxied requests
'"upstream_connect_time": "$upstream_connect_time", ' # upstream handshake time incl. TLS
'"upstream_header_time": "$upstream_header_time", ' # time spent receiving upstream headers
'"upstream_response_time": "$upstream_response_time", ' # time spend receiving upstream body
'"upstream_response_length": "$upstream_response_length", ' # upstream response length
'"upstream_cache_status": "$upstream_cache_status", ' # cache HIT/MISS where applicable
'"ssl_protocol": "$ssl_protocol", ' # TLS protocol
'"ssl_cipher": "$ssl_cipher", ' # TLS cipher
'"scheme": "$scheme", ' # http or https
'"http_user_agent":"$http_user_agent"'
'}';