这个是我的keepalived的配置,2边配置都一样,除了优先级和stateglobal_defs {notification_email { [email]123@abc.com[/email] } ...
显示全部这个是我的keepalived的配置,2边配置都一样,除了优先级和state
global_defs {
notification_email {
[email]123@abc.com[/email]
}
notification_email_from [email]1234@abc.com[/email]
smtp_server 192.168.60.30
smtp_connect_timeout 30
router_id LVS2
}
vrrp_sync_group test {
group {
loadbalance
}
}
vrrp_instance loadbalance {
state BACKUP
interface eth0
lvs_sync_daemon_inteface eth0
virtual_router_id 51
priority 90
advert_int 5
preempt_delay 5
authentication {
auth_type PASS
auth_pass 1111
}
virtual_ipaddress {
192.168.238.240
}
}
virtual_server 192.168.238.240 80 {
delay_loop 6
lb_algo rr
lb_kind DR
#persistence_timeout 20
protocol TCP
real_server 192.168.238.95 80 {
weight 3
TCP_CHECK {
connect_timeout 3
nb_get_retry 3
delay_before_retry 3
connect_port 80
}
}
real_server 192.168.238.94 80 {
weight 3
TCP_CHECK {
connect_timeout 3
nb_get_retry 3
delay_before_retry 3
connect_port 80
}
}
}
收起