about summary refs log tree commit diff
path: root/ops/nixos
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-02-21T16·10+0000
committerVincent Ambo <tazjin@google.com>2020-02-21T16·10+0000
commit25d8e7ce257e4ac31e65583ae14357d926388104 (patch)
treeed0870ee38a37a408a3e8f44c4037fb4ac4e5a8e /ops/nixos
parent1e51a2135d243f6bbfeac020143b720e813cde0c (diff)
feat(ops/nixos/camden): Modify nginx log format r/566
This log format contains more structured and correctly typed
information, which I can now use for dashboards and stuff in Stackdriver.
Diffstat (limited to 'ops/nixos')
-rw-r--r--ops/nixos/camden/default.nix16
1 files changed, 8 insertions, 8 deletions
diff --git a/ops/nixos/camden/default.nix b/ops/nixos/camden/default.nix
index 5d10c9fd1376..4533c6d2673d 100644
--- a/ops/nixos/camden/default.nix
+++ b/ops/nixos/camden/default.nix
@@ -191,15 +191,15 @@ in lib.fix(self: {
     commonHttpConfig = ''
       log_format json_combined escape=json
       '{'
-          '"time_local":"$time_local",'
           '"remote_addr":"$remote_addr",'
-          '"remote_user":"$remote_user",'
-          '"request":"$request",'
-          '"status": "$status",'
-          '"body_bytes_sent":"$body_bytes_sent",'
-          '"request_time":"$request_time",'
-          '"http_referrer":"$http_referer",'
-          '"http_user_agent":"$http_user_agent"'
+          '"method":"$request_method",'
+          '"uri":"$request_uri",'
+          '"status":$status,'
+          '"request_size":$request_length,
+          '"response_size":$body_bytes_sent,'
+          '"response_time":$request_time,'
+          '"referrer":"$http_referer",'
+          '"user_agent":"$http_user_agent"'
       '}';
 
       access_log syslog:server=unix:/dev/log,nohostname json_combined;