Skip to content

Instantly share code, notes, and snippets.

@zorteran
Created July 6, 2020 04:38
Show Gist options
  • Save zorteran/5a09c6e6590502b632ff772e85cadd05 to your computer and use it in GitHub Desktop.
Save zorteran/5a09c6e6590502b632ff772e85cadd05 to your computer and use it in GitHub Desktop.
Keepalived script + logstash check
global_defs {
enable_script_security
}
vrrp_script chk_logstash {
script "/etc/keepalived/lol.sh" # path of the script to execute
interval 1 # seconds between script invocations
timeout 1 # seconds after which script is considered to have failed
}
vrrp_instance VI_1 {
interface ens33
state MASTER
virtual_router_id 51
priority 101
virtual_ipaddress {
192.168.10.166
}
track_script {
chk_logstash
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment