]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: checks: provide environment variables to the external checks
authorCyril Bonté <cyril.bonte@free.fr>
Tue, 2 Dec 2014 20:21:36 +0000 (21:21 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 2 Dec 2014 20:44:33 +0000 (21:44 +0100)
commit9ede66b06d3b8dbf1c5c0d58bee42793b6bdac8d
tree837d169031cd556cf1f8fc18b0966324d777b251
parent777be861c5798072b561d21c03296c0fa82295d6
MEDIUM: checks: provide environment variables to the external checks

The external command accepted 4 arguments, some with the value "NOT_USED" when
not applicable. In order to make the exernal command more generic, this patch
also provides the values in environment variables. This allows to provide more
information.

Currently, the supported environment variables are :

PATH, as previously provided.

HAPROXY_PROXY_NAME, the backend name
HAPROXY_PROXY_ID, the backend id
HAPROXY_PROXY_ADDR, the first bind address if available (or empty)
HAPROXY_PROXY_PORT, the first bind port if available (or empty)

HAPROXY_SERVER_NAME, the server name
HAPROXY_SERVER_ID, the server id
HAPROXY_SERVER_ADDR, the server address
HAPROXY_SERVER_PORT, the server port if available (or empty)
HAPROXY_SERVER_MAXCONN, the server max connections
HAPROXY_SERVER_CURCONN, the current number of connections on the server
src/checks.c