diff options
author | Christian Breunig <christian@breunig.cc> | 2023-05-10 21:13:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-10 21:13:08 +0200 |
commit | 6eaa327c2a3bca3924e72cf7c5736489bb76f784 (patch) | |
tree | 3dcd4adf7692682026b3290b36c96de91d46c580 /data/templates/high-availability/keepalived.conf.j2 | |
parent | 96d9bf0a88fc822b8edd78db293b7f17ae8766cf (diff) | |
parent | 8dc6b0aa8d7bbecfc5087a7406725812779eaaf6 (diff) | |
download | vyos-1x-6eaa327c2a3bca3924e72cf7c5736489bb76f784.tar.gz vyos-1x-6eaa327c2a3bca3924e72cf7c5736489bb76f784.zip |
Merge pull request #1987 from dmbaturin/T5251-vrrp-group-ping
T5215: add a built-in ping check for VRRP groups
Diffstat (limited to 'data/templates/high-availability/keepalived.conf.j2')
-rw-r--r-- | data/templates/high-availability/keepalived.conf.j2 | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/data/templates/high-availability/keepalived.conf.j2 b/data/templates/high-availability/keepalived.conf.j2 index 6ea5f91d0..85b89c70c 100644 --- a/data/templates/high-availability/keepalived.conf.j2 +++ b/data/templates/high-availability/keepalived.conf.j2 @@ -32,9 +32,13 @@ global_defs { {% if vrrp.group is vyos_defined %} {% for name, group_config in vrrp.group.items() if group_config.disable is not vyos_defined %} -{% if group_config.health_check.script is vyos_defined %} +{% if group_config.health_check is vyos_defined %} vrrp_script healthcheck_{{ name }} { +{% if group_config.health_check.script is vyos_defined %} script "{{ group_config.health_check.script }}" +{% elif group_config.health_check.ping is vyos_defined %} + script "/usr/bin/ping -c1 {{ group_config.health_check.ping }}" +{% endif %} interval {{ group_config.health_check.interval }} fall {{ group_config.health_check.failure_count }} rise 1 @@ -121,7 +125,7 @@ vrrp_instance {{ name }} { {% endfor %} } {% endif %} -{% if group_config.health_check.script is vyos_defined %} +{% if group_config.health_check is vyos_defined %} track_script { healthcheck_{{ name }} } |