From d0ca797270d71efbec0385b8e04998e282913fee Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Fri, 21 Jun 2024 15:45:56 +0200 Subject: [PATCH] update nginx logformat --- components/network/nginx.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/components/network/nginx.nix b/components/network/nginx.nix index 82a57f9..89ba6c6 100644 --- a/components/network/nginx.nix +++ b/components/network/nginx.nix @@ -51,13 +51,18 @@ with lib; log_format json_combined escape=json '{' - '"time_local":"$time_local",' - '"remote_addr":"$remote_addr",' - '"remote_user":"$remote_user",' - '"request":"$request",' - '"status": "$status",' + '"timestamp":"$time_iso8601",' + '"facility":"nginx",' + '"src_addr":"$remote_addr",' '"body_bytes_sent":"$body_bytes_sent",' '"request_time":"$request_time",' + '"response_status":"$status",' + '"request_method":"$request_method",' + '"request":"$request",' + '"host":"$host",' + '"upstream_cache_status":"$upstream_cache_status",' + '"upstream_addr":"$upstream_addr",' + '"http_x_forwarded_for":"$http_x_forwarded_for",' '"http_referrer":"$http_referer",' '"http_user_agent":"$http_user_agent"' '}';