]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: ext-check: indicate the transport and protocol of a server
authorWilly Tarreau <w@1wt.eu>
Fri, 13 May 2022 13:58:35 +0000 (15:58 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 13 May 2022 14:06:29 +0000 (16:06 +0200)
commit973cf9071482c74418340c8b83ac863e0c60504a
treeea02c5a06907eda421c19cb52d4084b0421fa4a2
parent6796a06278767ac71c90c3fe858ad889db78981a
MINOR: ext-check: indicate the transport and protocol of a server

Valerio Pachera explained [1] that external checks would benefit from
having a variable indicating if SSL is being used or not on the server
being checked, and the discussion derived to also indicating the protocol
in use.

This patch adds two environment variables for external checks:
  - HAPROXY_SERVER_SSL: equals "0" when SSL is not used, "1" when it is
  - HAPROXY_SERVER_PROTO: contains one of the following words to describe
    the protocol used with this server:
      - "cli": the haproxy CLI. Normally not seen
      - "syslog": this is a syslog TCP server
      - "peers": this is a peers TCP server
      - "h1": this is an HTTP/1.x server
      - "h2": this is an HTTP/2 server
      - "tcp": this is any other TCP server

The patch is very simple, and may be backported to recent versions if
needed. This closes github issue #1692.

[1] https://www.mail-archive.com/haproxy@formilux.org/msg42233.html
doc/configuration.txt
src/extcheck.c