默认日志存放在系统日志:/var/log/messages下
[root@lb01 /]# tail -f /var/log/messages
Oct :: lb01 Keepalived_vrrp[]: Kernel is reporting: interface eth0 UP
Oct :: lb01 Keepalived_vrrp[]: VRRP_Instance(VI_1) Transition to MASTER STATE
Oct :: lb01 Keepalived_vrrp[]: VRRP_Instance(VI_1) Entering MASTER STATE
Oct :: lb01 Keepalived_vrrp[]: VRRP_Instance(VI_1) setting protocol VIPs.
Oct :: lb01 Keepalived_vrrp[]: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth0 for 192.168.119.150
Oct :: lb01 Keepalived_healthcheckers[]: Netlink reflector reports IP 192.168.119.150 added
Oct :: lb01 Keepalived_vrrp[]: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth0 for 192.168.119.150
Oct :: lb01 dhclient[]: DHCPREQUEST on eth0 to 192.168.119.254 port (xid=0x32903a31)
Oct :: lb01 dhclient[]: DHCPACK from 192.168.119.254 (xid=0x32903a31)
Oct :: lb01 dhclient[]: bound to 192.168.119.128 -- renewal in seconds.
把日志单独存放
修改/etc/sysconfig/keepalived
把KEEPALIVED_OPTIONS="-D" 修改为:KEEPALIVED_OPTIONS="-D -d -S 0"
[root@lb01 /]# vim /etc/sysconfig/keepalived
# Options for keepalived. See `keepalived --help' output and keepalived(8) and
# keepalived.conf() 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 - Set local syslog facility (default=LOG_DAEMON)
# KEEPALIVED_OPTIONS="-D -d -S 0"
在/etc/rsyslog.conf 末尾添加
[root@lb01 /]# vim /etc/rsyslog.conf
local0.* /var/log/keepalived.log
重启日志记录服务
[root@lb01 /]# /etc/init.d/rsyslog restart
Shutting down system logger: [ OK ]
Starting system logger: [ OK ]
重启keepalived
[root@lb01 /]# /etc/init.d/keepalived restart
Stopping keepalived: [ OK ]
Starting keepalived: [ OK ]
查看日志
[root@lb01 /]# tail -f /var/log/keepalived.log
Oct :: lb01 Keepalived_healthcheckers[]: Using autogen SSL context
Oct :: lb01 Keepalived_healthcheckers[]: Using LinkWatch kernel netlink reflector...
Oct :: lb01 Keepalived_vrrp[]: VRRP sockpool: [ifindex(), proto(), unicast(), fd(,)]
Oct :: lb01 Keepalived_vrrp[]: VRRP_Instance(VI_1) Transition to MASTER STATE
Oct :: lb01 Keepalived_vrrp[]: VRRP_Instance(VI_1) Received lower prio advert, forcing new election
Oct :: lb01 Keepalived_vrrp[]: VRRP_Instance(VI_1) Entering MASTER STATE
Oct :: lb01 Keepalived_vrrp[]: VRRP_Instance(VI_1) setting protocol VIPs.
Oct :: lb01 Keepalived_healthcheckers[]: Netlink reflector reports IP 192.168.119.150 added
Oct :: lb01 Keepalived_vrrp[]: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth0 for 192.168.119.150
Oct :: lb01 Keepalived_vrrp[]: VRRP_Instance(VI_1) Sending gratuitous ARPs on eth0 for 192.168.119.150
Keepalived日志的更多相关文章
-
keepalived日志显示脚本能执行成功,但是amoeba程序没启动起来,单独执行脚本amoeba能启动成功,放到keepalived里面启动不起来
keepalived日志如图: 解决:keepalived还有crontab等计划任务自动执行脚本,并不会有本地用户的环境变量,需要在脚本里面加 . /etc/profile 引入本地用户的环境变量
-
Centos7 keepalived 修改日志路径
Keepalived默认所有的日志都是写入到/var/log/message下的,由于message的日志太多了,而Keepalived的日志又很难分离出来,所以本文提供了一个调整Keepalived ...
-
Net分布式系统之三:Keepalived+LVS+Nginx负载均衡之高可用
上一篇写了nginx负载均衡,此篇实现高可用(HA).系统整体设计是采用Nginx做负载均衡,若出现Nginx单机故障,则导致整个系统无法正常运行.针对系统架构设计的高可用要求,我们需要解决Nginx ...
-
keepalived+LVS 实现双机热备、负载均衡、失效转移 高性能 高可用 高伸缩性 服务器集群
本章笔者亲自动手,使用LVS技术实现实现一个可以支持庞大访问量.高可用性.高伸缩性的服务器集群 在读本章之前,可能有不少读者尚未使用该技术,或者部分读者使用Nginx实现应用层的负载均衡.这里大家都可 ...
-
通过Keepalived实现Redis Failover自动故障切换功能
通过Keepalived实现Redis Failover自动故障切换功能[实践分享] 参考资料: http://patrick-tang.blogspot.com/2012/06/redis-keep ...
-
redis+Keepalived实现Redis主从复制
redis+Keepalived实现Redis主从复制: 环境:CentOs6.5Master: 10.10.10.203Slave: 10.10.10.204Virtural IP Addres ...
-
为什么很多人用keepalived来实现redis故障转移
目前,Redis还没有一个类似于MySQL Proxy或Oracle RAC的官方HA方案.Redis作者有一个名为Redis Sentinel的计划 ,据称将会有监控,报警和自动故障转移三大功能,非 ...
-
CentOS下安装keepalived 进行服务器热备
一.准备: 1.1 安装依赖软件 如果系统为基本文本安装,需要安装一下软件 yum -y install ipvsadm yum -y install kernel kernel-devel reb ...
-
Keepalived+LVS+Nginx负载均衡之高可用
Keepalived+LVS+Nginx负载均衡之高可用 上一篇写了nginx负载均衡,此篇实现高可用(HA).系统整体设计是采用Nginx做负载均衡,若出现Nginx单机故障,则导致整个系统无法正常 ...
随机推荐
-
旧文—冬日感怀
冬日感怀 下雪了,虽不大,可那雪花落在手上,融在心里,便泛起淡淡的温柔,因为这是冬日的馈赠啊,是上苍的礼物,是往昔记忆的灰烬化作天地间的精灵装点纷繁琐碎的世界.于是,透过汽车上雾气氤氲的玻璃窗,人 ...
-
sequenza细胞纯度计算
安装sequenza bam文件要放在前面,否侧会-f命令可能识别错误 samtools mpileup a.bam -f hg19.fasta -Q 20 |gzip > normal.pil ...
-
[itint5]根据前序后序遍历统计二叉树
http://www.itint5.com/oj/#28 这题有意思.一开始还想不清楚,看了解释,很棒. 这个题目的特殊之处是所有节点的值都是不一样的. 所以递归过程可以大大简化. 先看两种遍历的性质 ...
-
Unique Binary Search Trees In JAVA
Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For examp ...
-
LeetCode 476. Number Complement
Given a positive integer, output its complement number. The complement strategy is to flip the bits ...
-
控制台调用天气API例子
第一步,新建控制台应用程序,然后新建类:WeatherReport: using System; using System.Collections.Generic; using System.Linq ...
-
python两个 list 获取交集,并集,差集的方法
1. 获取两个list 的交集 #方法一: a=[2,3,4,5] b=[2,5,8] tmp = [val for val in a if val in b] print tmp #[2, 5] # ...
-
lucene修改索引——(六)
原理: 修改的原理是先删除,后增加一个,这也是常用的一种修改的方式. 删除的文档的id不会被新增加的文档占用,类似于mysql的自增,当删除一个id=2时,以后id=2就是空着的,不会上来一个把2给占 ...
-
使用overflow:hidden之后使的同行元素不对齐
一个父元素(块级元素)中有几个在同一水平线上的几个元素(行内块元素),设置其中某个元素的oveflow:hidden之后,会导致这几个行内元素不再是同一水平线上对齐 原因是: 1)行内元素的默认ver ...
-
POJ1995:Raising Modulo Numbers(快速幂取余)
题目:http://poj.org/problem?id=1995 题目解析:求(A1B1+A2B2+ ... +AHBH)mod M. 大水题. #include <iostream> ...