-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkeepalived.aws_eip.conf
42 lines (41 loc) · 955 Bytes
/
keepalived.aws_eip.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
vrrp_script check_process_state {
script "service %PROCESS% status"
interval 1
rise 2
fail 2
}
vrrp_script check_amazon_api {
script "flock -n /var/run/check_amazon_api -c /etc/keepalived/scripts/check_amazon_api.sh"
timeout 5
interval 15
rise 3
fall 2
}
vrrp_script check_eip_owner {
script "flock -n /var/run/check_eip_owner -c /etc/keepalived/scripts/check_eip_owner.sh"
timeout 5
interval 15
fall 4
}
vrrp_instance VI_1 {
interface eth0
state MASTER
virtual_router_id 42
priority 101 # 101 on master, 100 on backup
unicast_src_ip %LOCAL_IP% # local ip
unicast_peer {
%PEER_IP%
}
track_script {
check_process_state
check_amazon_api
check_eip_owner
}
# authentication {
# auth_type PASS
# auth_pass rAnDoM_pAsS
# }
notify_master /etc/keepalived/scripts/master.sh
notify_backup /etc/keepalived/scripts/backup.sh
notify_fault /etc/keepalived/scripts/backup.sh
}