Skip to content

Instantly share code, notes, and snippets.

@yegorg
Forked from mrlesmithjr/keepalived.conf
Created November 11, 2015 05:35
Show Gist options
  • Save yegorg/08ec7c3ce0326b7258ed to your computer and use it in GitHub Desktop.
Save yegorg/08ec7c3ce0326b7258ed to your computer and use it in GitHub Desktop.
vrrp_script chk_haproxy {
script "killall -0 haproxy" # verify the pid existance
interval 2 # check every 2 seconds
weight 2 # add 2 points of prio if OK
}
vrrp_instance VI_1 {
interface eth0 # interface to monitor
state MASTER
virtual_router_id 51 # Assign one ID for this route
priority 101 # 101 on master, 100 on backup (Make sure to change this on HAPROXY node2)
virtual_ipaddress {
10.0.101.60 # the virtual IP's
}
track_script {
chk_haproxy
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment