Skip to content

Instantly share code, notes, and snippets.

@vladbabii
Created January 14, 2017 21:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vladbabii/b7377491d1dde8b3cf4f8c03d965919e to your computer and use it in GitHub Desktop.
Save vladbabii/b7377491d1dde8b3cf4f8c03d965919e to your computer and use it in GitHub Desktop.
keepalived multi-master (aka equal) with 1 service or more services without priority
vrrp_script chk_apache2 {
script "/usr/bin/killall -0 apache2"
interval 2
fall 2
rise 2
}
vrrp_script chk_repcached {
script "/usr/bin/killall -0 repcached"
interval 2
fall 2
rise 2
}
vrrp_instance VI_104 {
state EQUAL
interface eth0
virtual_router_id 104
priority 100
unicast_src_ip 172.16.62.104
unicast_peer {
172.16.61.104
}
authentication {
auth_type PASS
auth_pass rnmgerigjrijjh59hu590h9s
}
virtual_ipaddress {
172.16.60.104/16 dev eth0 label eth0.1
10.6.250.104/16 dev eth1 label eth1.1
10.11.60.104/16 dev eth2 label eth2.1
}
track_script {
chk_apache2
chk_repcached
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment