vrrp_script chk_http_port { # Requires keepalived-1.1.13 script "wget -q -T 1.0 -t 2 --delete-after -O /tmp/test.wget http://localhost:80/index.html" interval 5 # check every 5 seconds weight 2 # add 2 points of prio if OK } vrrp_instance VI_1 { interface eth0 state BACKUP # MASTER debian1, BACKUP debian2 virtual_router_id 51 # same id in both hosts priority 100 # 101 on master, 100 on backup virtual_ipaddress { 192.168.122.23 # virtual IP } track_script { chk_http_port } }