Skip to content

Instantly share code, notes, and snippets.

@sirkirby
Created October 5, 2023 20:56
Show Gist options
  • Save sirkirby/54a8840ad8cbad082b659b22388f145a to your computer and use it in GitHub Desktop.
Save sirkirby/54a8840ad8cbad082b659b22388f145a to your computer and use it in GitHub Desktop.
keepalived secondary configuration
# assuming lb2 is 192.168.1.21
vrrp_script chk_haproxy {
script 'killall -0 haproxy' # faster than pidof
interval 2
}
vrrp_instance haproxy-vip {
interface eth1
state BACKUP
priority 100
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