global_defs { #Hostname will be used by default router_id master_node #vrrp_version 2 #vrrp_garp_master_delay 1 #vrrp_garp_master_refresh 60 #Uncomment the next line if you'd like to use unique multicast groups #vrrp_mcast_group4 224.0.0.{{VRID}} #script_user root #enable_script_security } vrrp_script chk_haproxy { script "/etc/keepalived/keepalived.sh" timeout 1 interval 1 # check every 1 second fall 2 # require 2 failures for KO rise 2 # require 2 successes for OK } vrrp_instance VI_1 { state MASTER interface eth0 virtual_router_id 51 priority 100 advert_int 1 nopreempt #Prevent fail-back track_script { chk_haproxy } authentication { auth_type PASS auth_pass 1111 } virtual_ipaddress { 192.168.0.247 } }