haproxy打印日志配置

jrhppt01:/var/log/haproxy# lsof haproxy.log
COMMAND   PID USER   FD   TYPE DEVICE   SIZE/OFF   NODE NAME
rsyslogd 2935 root    6w   REG  202,1 4884441877 786468 haproxy.log


需要配置rsyslog

[haproxy@haproxy haproxy]$ yum install  sysklogd syslog-n rsyslog

vi /etc/rsyslog.conf

添加下面配置:

  # Provides UDP syslog reception                                                                            
  $ModLoad imudp                                                                                                        

          
  $UDPServerRun 514                                                                                                     

      
  $UDPServerAddress 127.0.0.1  

*.info;mail.none;authpriv.none;cron.none;local3.none                /var/log/messages


local3.*    /var/log/haproxy/haproxy.log

#keepalived -S 0
local0.*	/var/log/keepalived/keepalived.log


启动rsyslog

v-

你可能感兴趣的:(haproxy)