NGINX upstream log format as JSON
By default the upstream log is defined as a regular human readable string. To switch to a JSON based format you might use this example:
parameters:
ingress_nginx:
helm_values:
controller:
config:
log-format-upstream: >-
{
"time": "$time_iso8601",
"remote_addr": "$proxy_protocol_addr",
"x-forward-for": "$proxy_add_x_forwarded_for",
"req_id": "$req_id",
"remote_user": "$remote_user",
"bytes_sent": $bytes_sent,
"request_time": $request_time,
"status": "$status",
"host": "$host",
"request_proto": "$server_protocol",
"request_uri": "$uri",
"request_query": "$args",
"request_length": $request_length,
"request_time": $request_time,
"request_method": "$request_method",
"http_referer": "$http_referer",
"http_user_agent": "$http_user_agent",
"namespace": "$namespace",
"ingress_name": "$ingress_name",
"service_name": "$service_name",
"service_port": "$service_port"
}