adding automation files
This commit is contained in:
parent
f61fa81ca7
commit
f451daddf1
2 changed files with 41 additions and 0 deletions
2
keepalived/check_komodo.sh
Normal file
2
keepalived/check_komodo.sh
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
curl -f http://localhost:9120/ > /dev/null 2>&1
|
||||||
39
keepalived/keepalived.conf.tpl
Normal file
39
keepalived/keepalived.conf.tpl
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
global_defs {
|
||||||
|
router_id 51
|
||||||
|
script_user root
|
||||||
|
enable_script_security
|
||||||
|
}
|
||||||
|
|
||||||
|
vrrp_script chk_komodo {
|
||||||
|
# CONTAINER PATH (Inside the mount)
|
||||||
|
script "/usr/local/etc/keepalived/check_komodo.sh"
|
||||||
|
interval 2
|
||||||
|
weight -5
|
||||||
|
fall 2
|
||||||
|
rise 1
|
||||||
|
}
|
||||||
|
|
||||||
|
vrrp_instance VI_1 {
|
||||||
|
state {{STATE}}
|
||||||
|
interface eth0
|
||||||
|
virtual_router_id 51
|
||||||
|
priority {{PRIORITY}}
|
||||||
|
advert_int 1
|
||||||
|
|
||||||
|
unicast_peer {
|
||||||
|
{{PEER}}
|
||||||
|
}
|
||||||
|
|
||||||
|
authentication {
|
||||||
|
auth_type PASS
|
||||||
|
auth_pass {{PASSWORD}}
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual_ipaddress {
|
||||||
|
172.16.201.250/24
|
||||||
|
}
|
||||||
|
|
||||||
|
track_script {
|
||||||
|
chk_komodo
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue