! Configuration File for keepalived

global_defs {
	notification_email {
}
	notification_email_from report@vqiu.cn
	smtp_server 127.0.0.1
	smtp_connect_timeout 30
	router_id LVS_DEVEL
}


#Monitor Script
vrrp_script chk_nginx { 
    script "/etc/keepalived/nginx_check.sh" 
    interval 2 
    weight 2 
} 

vrrp_instance VI_1 {
	state MASTER
	interface eth0
	virtual_router_id 51
	# 权重超高，优先级越大
	priority 100
	advert_int 1
	mcast_src_ip 192.168.10.81

	authentication {
		auth_type PASS
		auth_pass 1111
}

	virtual_ipaddress {
		192.168.10.88
}
}

vrrp_instance VI_2 {
	state BACKUP
	interface eth0
	virtual_router_id 52
	# 权重超高，优先级越大
	priority  99
	advert_int 1

	authentication {
		auth_type PASS
		auth_pass 1111
}

	virtual_ipaddress {
		192.168.10.89
}
}



