Health check log format

Hello,

I am using HAProxy in a container as an ingress controller and the logs are sent to stdout. I understand the format of normal request based logging as detailed in section 8 of the config documentation. However I can’t find anything that describes the format of the health check logs. For example I get the following logs as backend servers go up/down:

[pod/west-site1-haproxy-ingress-bsqlr/haproxy] 2024-03-13T12:46:28.197839096-04:00 [WARNING]  (31) : Server west-site1-ingress-local_3480/srv002 is DOWN, reason: Layer4 connection problem, info: "Connection refused", check duration: 0ms. 3 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
[pod/west-site1-haproxy-ingress-848lw/haproxy] 2024-03-13T12:44:49.880277206-04:00 [WARNING]  (441) : Server west-site1-ingress-local_3480/srv002 is UP, reason: Layer7 check passed, code: 405, check duration: 1ms. 4 active and 0 backup servers online. 0 sessions requeued, 0 total in queue
[pod/west-site1-haproxy-ingress-848lw/haproxy] 2024-03-13T12:46:52.365086119-04:00 [WARNING]  (441) : Server west-site1-ingress-local_3480/srv002 was DOWN and now enters maintenance.

The podname and timestamps at the start are added by kubectl, and the rest is from HAProxy. Is there any explanation of the format of the health check logs? I haven’t configured the logging format in anyway in the haproxy.cfg file, so I assume that this is the default format.

We’re getting ask questions about this format by customers who want to parse and handle these logs with fluetnd.

From what I can tell the format seems to be:

  • hostname
  • timestamp
  • log severity
  • (???) - Not sure about this one.
  • Server name and server state
  • reason

Any help would be appreciated.