Last active
October 5, 2023 20:56
-
-
Save sirkirby/0c88f9ece0c8e68e2a629818ea8a8da3 to your computer and use it in GitHub Desktop.
keepalived primary configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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