DOC: config: add example for server "track" keyword
authorAurelien DARRAGON <adarragon@haproxy.com>
Tue, 17 Dec 2024 10:54:06 +0000 (11:54 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 9 Jan 2025 09:28:04 +0000 (10:28 +0100)
As requested on GH #2325, "track" server keyword could benefit from a
simple config example to show how to make use of it.

That's what we're doing in this commit, thanks to GH user @HAkmiller
for the suggestion.

(cherry picked from commit 48545113f4db86ad43a99ba01742a9811410e6dc)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit d270bc5864a3cec0b5faf40ae8ca9db0a365da81)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>

doc/configuration.txt

index ccd2a01..5b62244 100644 (file)
@@ -18284,6 +18284,15 @@ track [<backend>/]<server>
   enabled. If <backend> is omitted the current one is used. If disable-on-404 is
   used, it has to be enabled on both proxies.
 
+  Example :
+
+    backend A
+    server a1 1.1.1.1:80 track B/b1
+    server a2 1.1.1.2:80 track B/b1
+
+    backend B
+    server b1 2.2.2.2:80 check
+
 tls-tickets
   May be used in the following contexts: tcp, http, log, peers, ring