Created
January 29, 2016 20:34
-
-
Save amichaelgrant/6225616e92a6d1999107 to your computer and use it in GitHub Desktop.
VRRP Keepalived
This file contains 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
! Configuration file for keepalived | |
vrrp_script chk_nginx { | |
script "pidof nginx" | |
interval 2 | |
weight -60 | |
} | |
vrrp_instance VI_1 { | |
debug 2 | |
interface eth0 # interface to monitor | |
state MASTER | |
virtual_router_id 51 # Assign one ID for this route | |
priority 150 # 150 on master, 100 on backup | |
unicast_src_ip 100.0.0.151 # My IP | |
unicast_peer { | |
100.0.0.120 # peer IP | |
} | |
virtual_ipaddress { | |
100.0.0.255 dev eth0 | |
} | |
authentication { | |
auth_type PASS | |
auth_pass pass-string-goes-here | |
} | |
track_script { | |
chk_nginx | |
} | |
notify_master "/etc/keepalived/vrrp.master.sh" | |
notify_backup "/etc/keepalived/vrrp.backup.sh" | |
notify_fault "/etc/keepalived/vrrp.fault.sh" | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment