keepalived⽇志默认⽇志存放在 /var/log/messages记住我
⼀、查看配置⽂件
# Options for keepalived. See `keepalived --help' output and keepalived(8) and
# f(5) man pages for a list of all options. Here are the most
# common ones :
#
# --vrrp              -P    Only run with VRRP subsystem.
# --check              -C    Only run with Health-checker subsystem.
# --dont-release-vrrp  -V    Dont remove VRRP VIPs & VROUTEs on daemon stop.
# --dont-release-ipvs  -I    Dont remove IPVS topology on daemon stop.
# --dump-conf          -d    Dump the configuration data.
# --log-detail        -D    Detailed log messages.
# --log-facility      -S    0-7 Set local syslog facility (default=LOG_DAEMON)
#
KEEPALIVED_OPTIONS="-D"
⼆、修改配置⽂件
vi /etc/sysconfig/keepalived
KEEPALIVED_OPTIONS="-D -S 6"
三、修改⽇志⽂件,将⾃定义⽇志⽂件写到 /var/log/keepalived.log
vim /f
local6.*                                                /var/log/keepalived.log
四、重启⽇志服务,和Keepalive服务
systemctl restart rsyslog keepalived