From: Remi Tricot-Le Breton Date: Tue, 1 Dec 2026 14:30:47 +0000 (+0100) Subject: DOC: vars: Add missing http/tcp-check part of the set-vars-from-map action X-Git-Url: https://git.kaiwu.me/http/%22../$%7BISSUES%7D/static/%7B@url%7D?a=commitdiff_plain;h=1e88edda0a84d21ec7eddee6cf463a5fc1d85c0c;p=haproxy.git DOC: vars: Add missing http/tcp-check part of the set-vars-from-map action This action can be used in both tcp-check and http-check rules but it was never mentioned in the doc. --- diff --git a/doc/configuration.txt b/doc/configuration.txt index 536457b00..17903e527 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -6621,6 +6621,7 @@ http-check expect X - X X http-check send X - X X http-check send-state X - X X http-check set-var X - X X +http-check set-vars-from-map X - X X http-check unset-var X - X X http-error X X X X http-request X (!) X X X @@ -6739,6 +6740,7 @@ tcp-check send-lf X - X X tcp-check send-binary X - X X tcp-check send-binary-lf X - X X tcp-check set-var X - X X +tcp-check set-vars-from-map X - X X tcp-check unset-var X - X X tcp-request connection X (!) X X - tcp-request content X (!) X X X @@ -9617,6 +9619,45 @@ http-check set-var-fmt([,...]) http-check set-var-fmt(check.port) "name=%H" +http-check set-vars-from-map(,[,]) + This operation loads the two-column map file and sets one variable + per entry. The first column of each entry holds the unqualified variable name + and the second column holds the value. For every entry, a variable named + "." is set, so all entries share the same . Only the + "sess" and "check" scopes are usable in check rules. + + The optional argument states how the values must be parsed. It + defaults to "str" and accepts: + - "str": values are kept as strings, including any embedded space; + - "int": values are parsed as strict integers, so that entries with + trailing garbage are rejected instead of being silently + truncated; + - "bool": values are parsed as booleans. The "true" and "false" spellings + are accepted in any case, as are the integers 0 and 1. + + An entry whose name is not a valid variable name, or whose value cannot be + parsed with the requested , is silently ignored. At most + "tune.vars.from-map.max" entries (100 by default) are processed per rule + evaluation. + + The map file is loaded at configuration parsing time using the same mechanism + as the "map()" converter, so it may be shared with map lookups as long as it + is a two-column file. The current generation of entries is evaluated on every + check execution, so updates made through the stats socket are taken into + account. + + May be used in the following contexts: tcp, http + + May be used in sections: defaults | frontend | listen | backend + yes | no | yes | yes + + Examples : + http-check set-vars-from-map(check,/etc/haproxy/check-vars.map) + http-check set-vars-from-map(check,/etc/haproxy/check-limits.map,int) + + See also : "set-vars-from-map", "tune.vars.from-map.max" + + http-check unset-var() Free a reference to a variable within its scope. @@ -15022,6 +15063,45 @@ tcp-check set-var-fmt([,...]) tcp-check set-var-fmt(check.name) "%H" +tcp-check set-vars-from-map(,[,]) + This operation loads the two-column map file and sets one variable + per entry. The first column of each entry holds the unqualified variable name + and the second column holds the value. For every entry, a variable named + "." is set, so all entries share the same . Only the + "sess" and "check" scopes are usable in check rules. + + The optional argument states how the values must be parsed. It + defaults to "str" and accepts: + - "str": values are kept as strings, including any embedded space; + - "int": values are parsed as strict integers, so that entries with + trailing garbage are rejected instead of being silently + truncated; + - "bool": values are parsed as booleans. The "true" and "false" spellings + are accepted in any case, as are the integers 0 and 1. + + An entry whose name is not a valid variable name, or whose value cannot be + parsed with the requested , is silently ignored. At most + "tune.vars.from-map.max" entries (100 by default) are processed per rule + evaluation. + + The map file is loaded at configuration parsing time using the same mechanism + as the "map()" converter, so it may be shared with map lookups as long as it + is a two-column file. The current generation of entries is evaluated on every + check execution, so updates made through the stats socket are taken into + account. + + May be used in the following contexts: tcp, http, log + + May be used in sections: defaults | frontend | listen | backend + yes | no | yes | yes + + Examples : + tcp-check set-vars-from-map(check,/etc/haproxy/check-vars.map) + tcp-check set-vars-from-map(check,/etc/haproxy/check-limits.map,int) + + See also : "set-vars-from-map", "tune.vars.from-map.max" + + tcp-check unset-var() Free a reference to a variable within its scope. @@ -35048,6 +35128,7 @@ http-check send [meth ] [{ uri | uri-lf }>] [ver ] http-check send-state http-check set-var([,...]) http-check set-var-fmt([,...]) +http-check set-vars-from-map(,[,]) http-check unset-var() Add a specific http-check rule for a "httpchk" healthcheck. The same syntax than the corresponding proxy's directives is used. See the corresponding proxy @@ -35067,6 +35148,7 @@ tcp-check send-binary [comment ] tcp-check send-binary-lf [comment ] tcp-check set-var([,...]) tcp-check set-var-fmt([,...]) +tcp-check set-vars-from-map(,[,]) tcp-check unset-var() Add a specific tcp-check rule for a "tcp-check" healthcheck. The same syntax than the corresponding proxy's directives is used. See the corresponding proxy