summaryrefslogtreecommitdiff
path: root/interface-definitions
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-04-21 12:54:13 +0200
committerGitHub <noreply@github.com>2024-04-21 12:54:13 +0200
commit2208c846d6bffeecac99afa7ebc3eda5c467aebc (patch)
tree984e88cdf2604bb418608fd8b2970c4f3739c710 /interface-definitions
parent8062edbefb311257c5f0dd5e6810334e4d120eb9 (diff)
parent98a0fdbef343c20c5054abea478a81e5b86c254f (diff)
downloadvyos-1x-2208c846d6bffeecac99afa7ebc3eda5c467aebc.tar.gz
vyos-1x-2208c846d6bffeecac99afa7ebc3eda5c467aebc.zip
Merge pull request #3332 from vyos/mergify/bp/sagitta/pr-3325
T6246: basic haproxy http-check configuration (backport #3325)
Diffstat (limited to 'interface-definitions')
-rw-r--r--interface-definitions/load-balancing_reverse-proxy.xml.in59
1 files changed, 59 insertions, 0 deletions
diff --git a/interface-definitions/load-balancing_reverse-proxy.xml.in b/interface-definitions/load-balancing_reverse-proxy.xml.in
index 49d1d858e..eb01580da 100644
--- a/interface-definitions/load-balancing_reverse-proxy.xml.in
+++ b/interface-definitions/load-balancing_reverse-proxy.xml.in
@@ -102,6 +102,65 @@
</leafNode>
</children>
</node>
+ <node name="http-check">
+ <properties>
+ <help>HTTP check configuration</help>
+ </properties>
+ <children>
+ <leafNode name="method">
+ <properties>
+ <help>HTTP method used for health check</help>
+ <completionHelp>
+ <list>options head get post put</list>
+ </completionHelp>
+ <valueHelp>
+ <format>options|head|get|post|put</format>
+ <description>HTTP method used for health checking</description>
+ </valueHelp>
+ <constraint>
+ <regex>(options|head|get|post|put)</regex>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="uri">
+ <properties>
+ <help>URI used for HTTP health check (Example: '/' or '/health')</help>
+ <constraint>
+ <regex>^\/([^?#\s]*)(\?[^#\s]*)?$</regex>
+ </constraint>
+ </properties>
+ </leafNode>
+ <node name="expect">
+ <properties>
+ <help>Expected response for the health check to pass</help>
+ </properties>
+ <children>
+ <leafNode name="status">
+ <properties>
+ <help>Expected response status code for the health check to pass</help>
+ <valueHelp>
+ <format>u32:200-399</format>
+ <description>Expected response code</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 200-399"/>
+ </constraint>
+ <constraintErrorMessage>Status code must be in range 200-399</constraintErrorMessage>
+ </properties>
+ </leafNode>
+ <leafNode name="string">
+ <properties>
+ <help>Expected to be in response body for the health check to pass</help>
+ <valueHelp>
+ <format>txt</format>
+ <description>A string expected to be in the response</description>
+ </valueHelp>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+ </children>
+ </node>
#include <include/haproxy/rule-backend.xml.i>
<tagNode name="server">
<properties>