Merge pull request #1813 from marketlogicsoftware/kayrus/nginx-log-format
Automatic merge from submit-queue
Added domain name and server port into nginx logs
I replaced dashes so it shouldn't brake log parsers.
In addition here are the [fluentd rules](dc71d8db4a/docker/fluentd/td-agent.conf (L230..L237)
) which parse these logs (requires https://github.com/tagomoris/fluent-plugin-parser plugin)
This commit is contained in:
commit
e1faa8ebe9
1 changed files with 2 additions and 2 deletions
|
@ -73,8 +73,8 @@ http {
|
|||
|
||||
client_max_body_size "{{ $cfg.bodySize }}";
|
||||
|
||||
log_format upstreaminfo '{{ if $cfg.useProxyProtocol }}$proxy_protocol_addr{{ else }}$remote_addr{{ end }} - '
|
||||
'[$proxy_add_x_forwarded_for] - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" '
|
||||
log_format upstreaminfo '{{ if $cfg.useProxyProtocol }}$proxy_protocol_addr{{ else }}$remote_addr{{ end }} $host '
|
||||
'[$proxy_add_x_forwarded_for] $server_port $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" '
|
||||
'$request_length $request_time [$proxy_upstream_name] $upstream_addr $upstream_response_length $upstream_response_time $upstream_status';
|
||||
|
||||
{{/* map urls that should not appear in access.log */}}
|
||||
|
|
Loading…
Reference in a new issue