Create keepalive.config

This commit is contained in:
2019-03-04 21:26:47 -06:00
parent 5ced21e2a4
commit 7f8762a6d1

View File

@@ -0,0 +1,31 @@
#haproxy - You can add more types manually after this.
vrrp_script chk_haproxy {
script "killall -0 haproxy" # verify the pid existance
interval 2 # check every 2 seconds
weight 2 # add 2 points of prio if OK
}
vrrp_instance VI_HAPROXY {
interface ens192 # interface to monitor
state MASTER
virtual_router_id 51 # Assign one ID for this route
priority 104
unicast_src_ip 10.5.10.51
unicast_peer {
10.5.10.52
10.5.10.53
10.5.10.120
10.5.10.121
}
virtual_ipaddress {
10.5.10.56 # the virtual IP
}
track_script {
chk_haproxy
}
# notify /usr/local/bin/notify_keepalived.sh
}
# DO NOT REMOVE THE NEXT LINE
#@S9S_NEXT_SECTION@