/usr/share/doc/keepalived/samples/keepalived.conf.vrrp.localcheck is in keepalived 1:1.2.19-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | ! Configuration File for keepalived
vrrp_script chk_sshd {
script "killall -0 sshd" # cheaper than pidof
interval 2 # check every 2 seconds
weight -4 # default prio: -4 if KO
fall 2 # require 2 failures for KO
rise 2 # require 2 successes for OK
}
vrrp_script chk_haproxy {
script "killall -0 haproxy" # cheaper than pidof
interval 2 # check every 2 seconds
}
vrrp_script chk_http_port {
script "</dev/tcp/127.0.0.1/80" # connects and exits
interval 1 # check every second
weight -2 # default prio: -2 if connect fails
}
vrrp_script chk_https_port {
script "</dev/tcp/127.0.0.1/443"
interval 1
weight -2
}
vrrp_script chk_smtp_port {
script "</dev/tcp/127.0.0.1/25"
interval 1
weight -2
}
vrrp_instance VI_1 {
interface eth0
state MASTER
virtual_router_id 51
priority 100
virtual_ipaddress {
192.168.200.18/25
}
track_interface {
eth1 weight 2 # prio = +2 if UP
eth2 weight -2 # prio = -2 if DOWN
eth3 # no weight, fault if down
}
track_script {
chk_sshd # use default weight from the script
chk_haproxy weight 2 # +2 if process is present
chk_http_port
chk_https_port
chk_smtp_port
}
}
vrrp_instance VI_2 {
interface eth1
state MASTER
virtual_router_id 52
priority 100
virtual_ipaddress {
192.168.201.18/26
}
track_interface {
eth0 weight 2 # prio = +2 if UP
eth2 weight -2 # prio = -2 if DOWN
eth3 # no weight, fault if down
}
track_script {
chk_haproxy weight 2
chk_http_port
chk_https_port
chk_smtp_port
}
}
vrrp_instance VI_3 {
interface eth0
virtual_router_id 53
priority 100
virtual_ipaddress {
192.168.200.19/27
}
}
vrrp_instance VI_4 {
interface eth1
virtual_router_id 54
priority 100
virtual_ipaddress {
192.168.201.19/28
}
}
vrrp_instance VI_5 {
state MASTER
interface eth0
virtual_router_id 55
priority 100
virtual_ipaddress {
192.168.200.20/27
}
}
vrrp_instance VI_6 {
state MASTER
interface eth0
virtual_router_id 56
priority 100
virtual_ipaddress {
192.168.200.21/27
}
}
vrrp_instance VI_7 {
state MASTER
interface eth0
virtual_router_id 57
priority 100
virtual_ipaddress {
192.168.200.22/27
}
}
vrrp_instance VI_8 {
state MASTER
interface eth0
virtual_router_id 58
priority 100
virtual_ipaddress {
192.168.200.23/27
}
}
vrrp_instance VI_9 {
state MASTER
interface eth0
virtual_router_id 59
priority 100
virtual_ipaddress {
192.168.200.24/27
}
}
|