Skip to content

Instantly share code, notes, and snippets.

@thresheek
Last active August 24, 2017 11:45
Show Gist options
  • Save thresheek/1656951e94ca47a2cbdc790bc21dbe96 to your computer and use it in GitHub Desktop.
Save thresheek/1656951e94ca47a2cbdc790bc21dbe96 to your computer and use it in GitHub Desktop.
global_defs {
vrrp_version 3
}
vrrp_script chk_manual_failover {
script "/usr/lib/keepalived/nginx-ha-manual-failover"
interval 10
weight 50
}
vrrp_script chk_nginx_service {
script "/usr/lib/keepalived/nginx-ha-check"
interval 3
weight 50
}
vrrp_instance VI_1 {
interface eth0
priority 100
virtual_router_id 51
advert_int 1
accept
unicast_src_ip 192.168.128.114
unicast_peer {
192.168.128.111
192.168.128.112
}
virtual_ipaddress {
10.0.0.33
}
track_script {
chk_nginx_service
chk_manual_failover
}
notify "/usr/lib/keepalived/nginx-ha-notify"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment