From 9b7f37aa2cd935790c7125dc3807bfc8123a2863 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Mon, 26 Dec 2022 17:07:48 +0100 Subject: [PATCH] logs HAProxy --- HowtoHaproxy.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/HowtoHaproxy.md b/HowtoHaproxy.md index 6bfc19d2..678cfd2e 100644 --- a/HowtoHaproxy.md +++ b/HowtoHaproxy.md @@ -681,7 +681,48 @@ A partir de HaProxy 2.2 (Debian Bullseye, ou Buster avec les backports) : ~~~ +## Lecture des logs +HAProxy a des logs différents selon le type de connexion. + + +Pour les connexions TCP ([Voir la doc complète](http://docs.haproxy.org/2.0/configuration.html#8.2.2)) : + +~~~ + Field Format Extract from the example above + 1 process_name '[' pid ']:' haproxy[14387]: + 2 client_ip ':' client_port 10.0.1.2:33313 + 3 '[' accept_date ']' [06/Feb/2009:12:12:51.443] + 4 frontend_name fnt + 5 backend_name '/' server_name bck/srv1 + 6 Tw '/' Tc '/' Tt* 0/0/5007 + 7 bytes_read* 212 + 8 termination_state -- + 9 actconn '/' feconn '/' beconn '/' srv_conn '/' retries* 0/0/0/0/3 + 10 srv_queue '/' backend_queue 0/0 +~~~ + +Pour les connexions HTTP ([Voir la doc complète](http://docs.haproxy.org/2.0/configuration.html#8.2.3)) :. + +~~~ + Field Format Extract from the example above + 1 process_name '[' pid ']:' haproxy[14389]: + 2 client_ip ':' client_port 10.0.1.2:33317 + 3 '[' request_date ']' [06/Feb/2009:12:14:14.655] + 4 frontend_name http-in + 5 backend_name '/' server_name static/srv1 + 6 TR '/' Tw '/' Tc '/' Tr '/' Ta* 10/0/30/69/109 + 7 status_code 200 + 8 bytes_read* 2750 + 9 captured_request_cookie - + 10 captured_response_cookie - + 11 termination_state ---- + 12 actconn '/' feconn '/' beconn '/' srv_conn '/' retries* 1/1/1/1/0 + 13 srv_queue '/' backend_queue 0/0 + 14 '{' captured_request_headers* '}' {haproxy.1wt.eu} + 15 '{' captured_response_headers* '}' {} + 16 '"' http_request '"' "GET /index.html HTTP/1.1" +~~~ ## HAPEE – HAProxy Enterprise Edition