僅適用於與 KATA 5.0 或更高版本的多個伺服器整合時。
要在叢集節點上配置內建平衡器:
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
預設情況下,項目每天旋轉。
systemctl restart rsyslog
systemctl restart syslog-ng
systemctl start haproxy
systemctl enable haproxy
systemctl status haproxy
狀態必須是running。
tail /var/log/haproxy.log
內建平衡器在 KSMG 叢集節點上配置並啟動。
頁面頂端