Centos7配置rsyslog并为keepalived设置日志
跳到导航
跳到搜索
rsyslog常用命令
rsyslog进程的控制命令为 查看进程运行情况(Status) : systemctl status rsyslog 停止(Stop) : systemctl stop rsyslog 重启(Restart) : systemctl restart rsyslog 启动(Start) : systemctl start rsyslog 查看514端口是否启动 : netstat -antup | grep 514
keepalived指定日志文件
vim /etc/sysconfig/keepalived KEEPALIVED_OPTIONS="-D -d -S 0" vim /etc/rsyslog.conf # keepalived -S 0 local0.* /var/log/keepalived.log
and then restart keepalived and rsyslog
注意
keepalived 默认日志在messages 里面哦 有时特别配置了不生效 也是在这里面的
上次就一直在找 最后在默认的 /var/log/messages 找到
Jul 21 10:58:58 localhost Keepalived_vrrp[20523]: Can't open /etc/keepalived/scripts/redis_fault.sh (errno 2 No such file or directory)
参考
Setup SysLog Server on CentOS 7 / RHEL 7