From 5e64b6834c59947a214cbc1e436762971186b65e Mon Sep 17 00:00:00 2001 From: Jude Zhu Date: Fri, 19 Jul 2019 07:36:13 +0800 Subject: [PATCH] Add [$proxy_alternative_upstream_name] https://github.com/kubernetes/ingress-nginx/pull/4246 --- docs/user-guide/nginx-configuration/log-format.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/user-guide/nginx-configuration/log-format.md b/docs/user-guide/nginx-configuration/log-format.md index cdd68e597..700714349 100644 --- a/docs/user-guide/nginx-configuration/log-format.md +++ b/docs/user-guide/nginx-configuration/log-format.md @@ -7,7 +7,7 @@ log_format upstreaminfo '{{ if $cfg.useProxyProtocol }}$proxy_protocol_addr{{ else }}$remote_addr{{ end }} - ' '[$the_real_ip] - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" "$http_user_agent" ' - '$request_length $request_time [$proxy_upstream_name] $upstream_addr ' + '$request_length $request_time [$proxy_upstream_name] [$proxy_alternative_upstream_name] $upstream_addr ' '$upstream_response_length $upstream_response_time $upstream_status $req_id'; ``` @@ -26,6 +26,7 @@ log_format upstreaminfo | `$request_length` | request length (including request line, header, and request body) | | `$request_time` | time elapsed since the first bytes were read from the client | | `$proxy_upstream_name` | name of the upstream. The format is `upstream---` | +| `$proxy_alternative_upstream_name` | name of the alternative upstream. The format is `upstream---` | | `$upstream_addr` | the IP address and port (or the path to the domain socket) of the upstream server. If several servers were contacted during request processing, their addresses are separated by commas. | | `$upstream_response_length` | the length of the response obtained from the upstream server | | `$upstream_response_time` | time spent on receiving the response from the upstream server as seconds with millisecond resolution | @@ -45,4 +46,4 @@ Additional available variables: Sources: - [Upstream variables](http://nginx.org/en/docs/http/ngx_http_upstream_module.html#variables) -- [Embedded variables](http://nginx.org/en/docs/http/ngx_http_core_module.html#variables) \ No newline at end of file +- [Embedded variables](http://nginx.org/en/docs/http/ngx_http_core_module.html#variables)