haproxy开启日志
haproxy开启日志 vi /etc/haproxy/haproxy.cfg #添加配置 global log 127.0.0.1 local2 info defaults mode http log global #开启日志功能 systemctl restart haproxy.service #修改日志 vi /etc/rsyslog.conf #去掉注释 # Provides UDP syslog reception $ModLoad imudp $UDPServerRun 514 #添加日志路径 local2.* /var/log/haproxy.log systemctl restart rsyslog.service #查看日志 [root@manager log]# tail -100f /var/log/harpox.log May 9 17:39:26 localhost haproxy[32484]: Connect from 100.98.100.186:60128 to 100.98.100.186:5000 (main/HTTP)
做一个决定,并不难,难的是付诸行动,并且坚持到底。