log_format fat-s-k8s '{"@timestamp":"$time_iso8601",' '"@source":"$server_addr",' '"app":"nginx",' '"hostname":"$hostname",' '"remote_user":"$remote_user",' '"ip":"$http_x_forwarded_for",' '"client":"$remote_addr",' '"request_method":"$request_method",' '"scheme":"$scheme",' '"domain":"$server_name",' '"referer":"$http_referer",' '"request":"$request_uri",' '"requesturl":"$request",' '"args":"$args",' '"size":$body_bytes_sent,' '"status": $status,' '"responsetime":$request_time,' '"upstreamtime":"$upstream_response_time",' '"upstreamaddr":"$upstream_addr",' '"http_user_agent":"$http_user_agent",' '"http_cookie":"$http_cookie",' '"https":"$https"' '}';
引用
access_log /data/k8s-storage/logs/fat-s-k8s/nginx/nginx-kkcloud-k8s-commsumer.json fat-s-k8s;