From 72d2b57e5d18dcf9e5effcb676e4f253ede74480 Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Wed, 6 Dec 2023 09:48:27 +0000 Subject: [PATCH] Expose /nginx_status on the proxy image for DataDog collection. --- hosting/proxy/nginx.prod.conf | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/hosting/proxy/nginx.prod.conf b/hosting/proxy/nginx.prod.conf index 6da2e4a1c3..88f9645f80 100644 --- a/hosting/proxy/nginx.prod.conf +++ b/hosting/proxy/nginx.prod.conf @@ -249,4 +249,30 @@ http { gzip_comp_level 6; gzip_types text/plain text/css text/xml application/json application/javascript application/rss+xml application/atom+xml image/svg+xml; } + + # From https://docs.datadoghq.com/integrations/nginx/?tab=kubernetes + server { + listen 81; + server_name localhost; + + access_log off; + allow 127.0.0.1; + deny all; + + location /nginx_status { + # Choose your status module + + # freely available with open source NGINX + stub_status; + + # for open source NGINX < version 1.7.5 + # stub_status on; + + # available only with NGINX Plus + # status; + + # ensures the version information can be retrieved + server_tokens on; + } + } }