-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.config
80 lines (62 loc) · 2.17 KB
/
example.config
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Keepalived Master configuration
File location:
/etc/keepalived/keepalived.conf
Content of the file:
vrrp_script chk_haproxy {
# User script for haproxy or any other check for running applications
# usage <scriptname + service> example # check-keepalived.sh sshd
script '/usr/local/bin/check-keepalived.sh sshd'
interval 1
}
global_defs {
# The email addresses the notification of the changes will be sent to
notification_email {
}
# The from address in the notification emails
notification_email_from dedicated-router1
# The smtp server to use
smtp_server localhost
# the smtp connect timeout
smtp_connect_timeout 30
# The name of the setup
router_id DEDICATED-ROUTER
}
vrrp_instance DEDICATEDROUTER {
interface bond0 # Binding interface
garp_master_delay 3 # Delay for gratuitous ARP after MASTER state transition
smtp_alert # Send email notify during state transit
virtual_router_id 245 # VRRP VRI
advert_int 1 # advertise activity every second
# we load the priority from the home dir, as this differs between server
include /home/copernica/priority.conf
# Used for the authentication of the vrrp packages
authentication {
auth_type PASS
auth_pass $murfsru1e!
}
# All the virtual IP addresses
virtual_ipaddress {
10.32.57.150 dev bond0 #
172.16.128.150 dev bond1 #
192.168.100.20 dev bond1 #
}
#for ipv6
#virtual_ipaddress_excluded {
# 2a03:e280:0:1::129:193/64 dev eth0 # wstemp.copernica.nl
#}
# monitor these as well.
# go to FAULT state if any of these go down.
track_interface {
bond0
bond1
}
track_script{
chk_haproxy
}
# store the currently active state for later retrieval
# notify_master "/home/copernica/PHP5/Resources/configfiles/loadbalancing/notify_master.sh"
# --> delme! notify_master "/home/copernica/notify_master.sh"
notify_backup "/bin/echo backup > /etc/keepalived/state"
notify_fault "/bin/echo fault > /etc/keepalived/state"
}