mirror of
https://github.com/opnsense/plugins.git
synced 2026-05-28 04:34:15 -04:00
net/haproxy: support rise/fall parameters in health checks
This commit is contained in:
parent
e89022506c
commit
8a569560cd
3 changed files with 34 additions and 0 deletions
|
|
@ -77,6 +77,20 @@
|
|||
<type>checkbox</type>
|
||||
<help><![CDATA[Enable to log health check status updates.]]></help>
|
||||
</field>
|
||||
<field>
|
||||
<id>backend.healthCheckFall</id>
|
||||
<label>Unhealthy Threshold</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[The number of consecutive unsuccessful health checks before a server is considered as unavailable.]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>backend.healthCheckRise</id>
|
||||
<label>Healthy Threshold</label>
|
||||
<type>text</type>
|
||||
<help><![CDATA[The number of consecutive successful health checks before a server is considered as available.]]></help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<label>Stick-table persistence</label>
|
||||
<type>header</type>
|
||||
|
|
|
|||
|
|
@ -664,6 +664,18 @@
|
|||
<default>0</default>
|
||||
<Required>N</Required>
|
||||
</healthCheckLogStatus>
|
||||
<healthCheckFall type="IntegerField">
|
||||
<MinimumValue>1</MinimumValue>
|
||||
<MaximumValue>100</MaximumValue>
|
||||
<ValidationMessage>Please specify a value between 1 and 100.</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</healthCheckFall>
|
||||
<healthCheckRise type="IntegerField">
|
||||
<MinimumValue>1</MinimumValue>
|
||||
<MaximumValue>100</MaximumValue>
|
||||
<ValidationMessage>Please specify a value between 1 and 100.</ValidationMessage>
|
||||
<Required>N</Required>
|
||||
</healthCheckRise>
|
||||
<stickiness_pattern type="OptionField">
|
||||
<Required>N</Required>
|
||||
<default>sourceipv4</default>
|
||||
|
|
|
|||
|
|
@ -1012,6 +1012,14 @@ backend {{backend.name}}
|
|||
{% if server_data.checkDownInterval|default("") != "" %}
|
||||
{% do server_options.append('downinter ' ~ server_data.checkDownInterval) %}
|
||||
{% endif %}
|
||||
{# # unhealthy threshold #}
|
||||
{% if backend.healthCheckFall|default("") != "" %}
|
||||
{% do server_options.append('fall ' ~ backend.healthCheckFall) %}
|
||||
{% endif %}
|
||||
{# # healthy threshold #}
|
||||
{% if backend.healthCheckRise|default("") != "" %}
|
||||
{% do server_options.append('rise ' ~ backend.healthCheckRise) %}
|
||||
{% endif %}
|
||||
{# # use a different port for health check #}
|
||||
{% if healthcheck_data.checkport|default("") != "" %}
|
||||
{# # prefer port from health check template #}
|
||||
|
|
|
|||
Loading…
Reference in a new issue