HAProxy Enterprise Documentation 2.2r1

Overview

Type of logs

HAProxy Enterprise generates two types of logs: access logs, also called traffic logs, and administrative logs.

Access Logs

Access logs, also called traffic logs, record information about client connections and requests.

The logs are stored in the /var/log/hapee-2.2 directory. Access log file names have the prefix lb-access plus a timestamp and are rotated on a daily basis.

The access log file is defined by this log entry in the global section of the HAProxy configuration file:

global
    log                127.0.0.1 local0            # access logs

This definition, which does not set a severity level for events, captures all events and tags them with the local0 syslog facility code. An rsyslog configuration file at /etc/rsyslog.d/hapee-<version>-lb.conf routes these events to the access log file.

Administrative Logs

Administrative logs record information about load balancer process events such as when a proxy server starts or stops.

The logs are stored in the /var/log/hapee-2.2 directory. Administrative log file names have the prefix lb-admin plus a timestamp and are rotated on a daily basis.

The administrative log file is defined by this log entry in the global section of the HAProxy configuration file:

global
    log                127.0.0.1 local1 notice     # administrative logs

This definition, which sets its severity level to notice, captures most log events but omits the more verbose traffic events captured by the access logs, and tags those events with the syslog facility code local1. An rsyslog configuration file at /etc/rsyslog.d/hapee-<version>-lb.conf routes these events to the admin log file. Basically, they have the same contents as access logs but without the info level details about connection and request events.

Network delivery

When the log directive is configured to send logs to a remote log server, the logs are sent using UDP. To send logs to a remote server using TCP instead, create a ring section in the node configuration. Then specify the ring name in the log directive and specify the remote server in the ring section.

See also


Next up

Enabling Logging
HAProxyConf 2022 - Call for papers