Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to deal with json format log ? #88

Open
soeric opened this issue Jan 26, 2018 · 2 comments
Open

How to deal with json format log ? #88

soeric opened this issue Jan 26, 2018 · 2 comments

Comments

@soeric
Copy link

soeric commented Jan 26, 2018

log format like this:

   log_format  json_full   '{'
                         '"@timestamp":"$time_iso8601",'
                         '"time_local":"$time_local",'
                         '"remote_user":"$remote_user",'
                         '"server_addr":"$server_addr",'
                         '"hostname":"$hostname",'
                         '"remote_addr":"$remote_addr",'
                         '"request_method":"$request_method",'
                         '"request":"$request",'
                         '"request_time":"$request_time",'
                         '"request_uri":"$request_uri",'
                         '"uri":"$uri",'
                         '"pid":"$pid",'
                         #'"tcpinfo_rttvar":"$tcpinfo_rttvar",'
                         #'"tcpinfo_snd_cwnd":"$tcpinfo_snd_cwnd",'
                         #'"tcpinfo_rcv_space":"$tcpinfo_rcv_space",'
                         '"tcpinfo_rtt":"$tcpinfo_rtt",'
                         '"host":"$host",'
                         '"http_name":"$http_name",'
                         '"cookie_name":"$cookie_name",'
                         '"query_string":"$query_string",'
                         '"status":"$status",'
                         '"content_length":"$content_length",'
                         '"body_bytes_sent":"$body_bytes_sent",'
                         '"http_referer":"$http_referer",'
                         '"http_user_agent":"$http_user_agent",'
                         '"http_x_forwarded_for":"$http_x_forwarded_for",'
                         '"http_x_real_ip":"$http_x_real_ip",'
                         '"http_header":"$http_header",'
                         '"bytes_sent":"$bytes_sent",'
                         '"http_range":"$http_range",'
                         '"connection":"$connection",'
                         '"connection_requests":"$connection_requests",'
                         '"request_time":"$request_time",'
                         '"upstream_addr":"$upstream_addr",'
                         '"upstream_status":"$upstream_status",'
                         '"upstream_header_time":"$upstream_header_time",'
                         '"upstream_cache_status":"$upstream_cache_status",'
                         '"upstream_connect_time":"$upstream_connect_time",'
                         '"upstream_cookie_name":"$upstream_cookie_name",'
                         '"upstream_response_time":"$upstream_response_time"'
                         '}';
@Frodox
Copy link

Frodox commented Feb 16, 2018

+1. I would like to parse nginx json logs too

@adrianlop
Copy link

same here - did anyone achieve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants