修改 Keepalived 日志输出位置
Keepalived 日志默认只输出到 /var/log/messages 文件中。由于 /var/log/messages 中记录了系统中其他服务的相关日志,日志内容刷新比较快,不便于观察,这里修改日志存储到一个单独文件中。
注意:修改keepalived日志输出路劲涉及到了重启keepalived服务,线上环境建请合理安排重启时间。
1.配置Keepalived日志输出信息修改 /etc/sysconfig/keepalived 配置文件,把 KEEPALIVED_OPTIONS="-D" 修改为: KEEPALIVED_OPTIONS="-D -d -S 0" 。
$ cat /etc/sysconfig/keepalived # Options for keepalived. See `keepalived --help' output and keepalived(8) and# keepalived.conf(5) man pages for a list of all options. Here are the mos ...