From 7ffc0baa66743fb4ab2860308a57862a7e1374c6 Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Fri, 13 Nov 2026 14:48:48 +0000 Subject: [PATCH] nomnatim: log nginx response time and upstream times. Enable log buffering --- cookbooks/nominatim/templates/default/nginx.erb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cookbooks/nominatim/templates/default/nginx.erb b/cookbooks/nominatim/templates/default/nginx.erb index e8cf0c57a..2cdbef1d7 100644 --- a/cookbooks/nominatim/templates/default/nginx.erb +++ b/cookbooks/nominatim/templates/default/nginx.erb @@ -105,13 +105,14 @@ real_ip_recursive off; # Custom log format to include JA4 TLS fingerprint and other details for better blocking and analysis log_format nominatim_log '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for" "$http_x_tls_ja4" "$http_x_ja4h"'; + '"$http_user_agent" "$http_x_forwarded_for" "$http_x_tls_ja4" "$http_x_ja4h" ' + 'rt=$request_time uct=$upstream_connect_time uht=$upstream_header_time urt=$upstream_response_time'; server { listen 80 default_server; listen [::]:80 default_server; - access_log <%= node[:nominatim][:logdir] %>/nominatim.openstreetmap.org-access.log nominatim_log; + access_log <%= node[:nominatim][:logdir] %>/nominatim.openstreetmap.org-access.log nominatim_log buffer=256k flush=5s; error_log <%= node[:nominatim][:logdir] %>/nominatim.openstreetmap.org-error.log; location /nginx_status { -- 2.47.3