8.2.1. Default log format



This log format is used when no specific option is set. The log is emitted as soon as the connection is accepted. One should note that this currently is the only format which logs the request’s destination IP and ports.

Example :

        listen www
            mode http
            log global
            server srv1 127.0.0.1:8000
    >>> Feb  6 12:12:09 localhost haproxy[14385]: Connect from 10.0.1.2:33312 to 10.0.3.31:8012 (www/HTTP)
Field Format Extract from the example above
1 process_name '[' pid ']:' haproxy[14385]:
2 'Connect from' Connect from
3 source_ip ':' source_port 10.0.1.2:33312
4 'to' to
5 destination_ip ':' destination_port 10.0.3.31:8012
6 '(' frontend_name '/' mode ')' (www/HTTP)

Detailed fields description :

  • “source_ip” is the IP address of the client which initiated the connection.
  • “source_port” is the TCP port of the client which initiated the connection.
  • “destination_ip” is the IP address the client connected to.
  • “destination_port” is the TCP port the client connected to.
  • “frontend_name” is the name of the frontend (or listener) which received and processed the connection.
  • “mode is the mode the frontend is operating (TCP or HTTP).

In case of a UNIX socket, the source and destination addresses are marked as “unix:” and the ports reflect the internal ID of the socket which accepted the connection (the same ID as reported in the stats).

It is advised not to use this deprecated format for newer installations as it will eventually disappear.

Share Button

Leave a Reply