-
Notifications
You must be signed in to change notification settings - Fork 2
keepalived 笔记
xiaoke_1256 edited this page Oct 2, 2024
·
4 revisions
- 日志配置
修改 /etc/sysconfig/keepalived 文件如下:
KEEPALIVED_OPTIONS="-D -S 6"
修改 /etc/rsyslog.conf 文件,在 # Save boot messages also to boot.log
下增加以下部分:
local6.* /var/log/keepalived.log
重启 rsyslog 和 keepalived
# systemctl restart keepalived
# systemctl restart rsyslog
然后就可以在 /var/log/keepalived.log 文件中查看日志了。
- 脚本无权限执行
可以参考这里。
或者把脚本直接写入配置文件,如:
script "</dev/tcp/192.168.249.101/3306"
表示用tcp/ip协议检测192.168.249.101机器上的3306端口。
Hi