Only applicable when integrating with multiple servers of КАТА 5.0 or a later version.
To configure the local balancer on a cluster node:
mv /etc/haproxy/haproxy.cfg /etc/haproxy/haproxy.cfg.orig
chown root:root /etc/haproxy/haproxy.cfg
chmod 640 /etc/haproxy/haproxy.cfg
$ModLoad imudp
$UDPServerRun 514
$UDPServerAddress 127.0.0.1
if $syslogfacility-text == 'local6' then /var/log/haproxy.log
if $syslogfacility-text == 'local6' then stop
if $programname startswith 'haproxy' then /var/log/haproxy.log
if $programname startswith 'haproxy' then stop
log {
source {
udp(ip(127.0.0.1) port(514));
};
filter {
facility(local6) or program("haproxy");
};
destination {
file("/var/log/haproxy.log");
};
};
touch /var/log/haproxy.log
chown root:adm /var/log/haproxy.log
chmod 640 /var/log/haproxy.log
By default, entries are rotated daily.
systemctl restart rsyslog
systemctl restart syslog-ng
systemctl start haproxy
systemctl enable haproxy
systemctl status haproxy
The status must be running.
tail /var/log/haproxy.log
The local balancer is configured and started on the KSMG cluster node.
Page top