]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: checks: Support log-format strings for tcp-check send rules
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 30 Mar 2020 17:52:29 +0000 (19:52 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 27 Apr 2020 07:39:37 +0000 (09:39 +0200)
commitf50f4e956fb644f3e4f6a423a710a1c7a71f2655
tree96950a3d0d5492baa1842d49a2a93c7dc6451731
parentb7d30098f355f4e7d72f3dbca1835924d625c912
MEDIUM: checks: Support log-format strings for tcp-check send rules

An extra parameter for tcp-check send rules can be specified to handle the
string or the hexa string as a log-format one. Using "log-format" option,
instead of considering the data to send as raw data, it is parsed as a
log-format string. Thus it is possible to call sample fetches to customize data
sent to a server. Of course, because we have no stream attached to healthchecks,
not all sample fetches are available. So be careful.

    tcp-check set-var(check.port) int(8000)
    tcp-check set-var(check.uri) str(/status)
    tcp-check connect port var(check.port)
    tcp-check send "GET %[check.uri] HTTP/1.0\r\n" log-format
    tcp-check send "Host: %[srv_name]\r\n" log-format
    tcp-check send "\r\n"
include/types/checks.h
src/checks.c