HAProxy Enterprise Documentation 1.8r2
Overview
HAProxy Enterprise stores logs in the /var/log/hapee-1.8 directory.
It stores lb-access log files, which record information about client connections and requests, and lb-admin log files, which record load balancer events such as when a proxy starts or stops.
Enable logging
To enable logging, follow these steps:
-
Add a log
line to the global
section in your configuration file.
global
# log all events to the local syslog UNIX socket
log /dev/log local0
# log 'notice' level events and above to a remote syslog server
log 127.0.0.1 local1 notice
The log
directive takes the following parameters:
the IP address of your syslog server or the path to a local syslog UNIX socket (i.e. /dev/log)
an optional len <length>
, which changes the default length of 1024 characters per log line
an optional format <format>
, which you can set to rfc3164 (default), rfc5424, short, or raw
an optional sample <range>:<size>
to capture a sample of the logs (i.e. 1 out of 3 would be sample 1:3
)
the facility code (usually local0 or, if that is already used, local1)
the level of verbosity; choose one of emerg, alert, crit, err, warning, notice, info, or debug. Leave this off to record all events.
-
In your frontend
or defaults
section, add a log global
directive, which uses the settings you defined with the log
directive in the global
section.
Next up
Log Custom Data