Skip to content

Instantly share code, notes, and snippets.

@sirkirby
Last active October 5, 2023 20:56
Show Gist options
  • Save sirkirby/0c88f9ece0c8e68e2a629818ea8a8da3 to your computer and use it in GitHub Desktop.
Save sirkirby/0c88f9ece0c8e68e2a629818ea8a8da3 to your computer and use it in GitHub Desktop.
keepalived primary configuration
# assuming lb1 is 192.168.1.20
vrrp_script chk_haproxy {
script 'killall -0 haproxy' # faster than pidof
interval 2
}
vrrp_instance haproxy-vip {
interface eth1
state MASTER
priority 200
virtual_router_id 51
virtual_ipaddress {
192.168.1.100/24
}
track_script {
chk_haproxy
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment