Last active
August 29, 2015 14:05
-
-
Save fengchj/66f5c6e5afc4603942aa to your computer and use it in GitHub Desktop.
keepalived.conf
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
global_defs { | |
notification_email { | |
xxx@gmail.com | |
} | |
notification_email_from keepalived@10-15-8-101 | |
smtp_server 127.0.0.1 | |
smtp_connect_timeout 4 | |
lvs_id nginx | |
} | |
vrrp_script chk_nginx { | |
script "pidof nginx" | |
interval 1 | |
weight 2 | |
} | |
vrrp_instance WEB_102 { | |
state BACKUP | |
interface eth0 | |
virtual_router_id 102 | |
priority 90 | |
advert_int 1 | |
mcast_src_ip 10.15.8.101 | |
smtp_alert | |
authentication { | |
auth_type PASS | |
auth_pass keep@lived | |
} | |
virtual_ipaddress { | |
10.15.8.102 | |
} | |
track_script { | |
chk_nginx | |
} | |
} |
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
global_defs { | |
notification_email { | |
xxx@gmail.com | |
} | |
notification_email_from keepalived@10-15-8-100 | |
smtp_server 127.0.0.1 | |
smtp_connect_timeout 4 | |
lvs_id nginx | |
} | |
vrrp_script chk_nginx { | |
script "pidof nginx" | |
interval 1 | |
weight 2 | |
} | |
vrrp_instance WEB_102 { | |
state MASTER | |
interface eth0 | |
virtual_router_id 102 | |
priority 91 | |
advert_int 1 | |
mcast_src_ip 10.15.8.100 | |
smtp_alert | |
authentication { | |
auth_type PASS | |
auth_pass keep@lived | |
} | |
virtual_ipaddress { | |
10.15.8.100 | |
} | |
track_script { | |
chk_nginx | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment