From f97598a1adf5299fe19671a844dcc8668e6ef8ff Mon Sep 17 00:00:00 2001 From: Jonni Liljamo Date: Sun, 29 Sep 2024 15:13:49 +0300 Subject: [PATCH] feat(systems/hosts/proxy): log response status on haproxy --- systems/hosts/proxy/haproxy.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/systems/hosts/proxy/haproxy.conf b/systems/hosts/proxy/haproxy.conf index ae4e69f..c307dd7 100644 --- a/systems/hosts/proxy/haproxy.conf +++ b/systems/hosts/proxy/haproxy.conf @@ -14,7 +14,7 @@ defaults frontend stats bind *:8404 http-request capture req.fhdr(User-Agent) len 512 - log-format "client_ip=\"%ci\" client_port=\"%cp\" time=\"%t\" frontend_name=\"%f\" backend_name=\"%b\" request=\"%r\" request_headers=\"%hr\"" + log-format "client_ip=\"%ci\" client_port=\"%cp\" time=\"%t\" frontend_name=\"%f\" backend_name=\"%b\" response_status=\"%ST\" request=\"%r\" request_headers=\"%hr\"" http-request use-service prometheus-exporter if { path /metrics } stats enable @@ -24,7 +24,7 @@ frontend stats frontend http-in bind 0.0.0.0:80 http-request capture req.fhdr(User-Agent) len 512 - log-format "client_ip=\"%ci\" client_port=\"%cp\" time=\"%t\" frontend_name=\"%f\" backend_name=\"%b\" request=\"%r\" request_headers=\"%hr\"" + log-format "client_ip=\"%ci\" client_port=\"%cp\" time=\"%t\" frontend_name=\"%f\" backend_name=\"%b\" response_status=\"%ST\" request=\"%r\" request_headers=\"%hr\"" acl host_media req.hdr(Host) media.liljamo.com acl allow_media_metrics src 10.1.2.5 @@ -47,7 +47,7 @@ frontend https-in bind 0.0.0.0:443 mode tcp option tcplog - log-format "client_ip=\"%ci\" client_port=\"%cp\" time=\"%t\" frontend_name=\"%f\" backend_name=\"%b\" request_headers=\"%hr\"" + log-format "client_ip=\"%ci\" client_port=\"%cp\" time=\"%t\" frontend_name=\"%f\" backend_name=\"%b\" response_status=\"%ST\" request_headers=\"%hr\"" default_backend be_caddy-https -- 2.44.1