keepalived 打印日志

<pre name="code" class="sql">[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

 /sbin/rsyslogd -i /var/run/syslogd.pid -c 5 

[root@master ~]# netstat -na | grep  514
udp        0      0 0.0.0.0:514                 0.0.0.0:*                               
udp        0      0 :::514                      :::*                                    
unix  3      [ ]         STREAM     CONNECTED     16514  @/

[root@master keepalived]# /usr/local/sbin/keepalived -D -d -S 0
[root@master keepalived]# ps -ef | grep keep
root      5201     1  0 23:49 ?        00:00:00 /usr/local/sbin/keepalived -D -d -S 0
root      5202  5201  0 23:49 ?        00:00:00 /usr/local/sbin/keepalived -D -d -S 0
root      5203  5201  0 23:49 ?        00:00:00 /usr/local/sbin/keepalived -D -d -S 0


 

你可能感兴趣的:(keepalived 打印日志)