]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
DOC: checks: environment variables used by "external-check command"
authorCyril Bonté <cyril.bonte@free.fr>
Sat, 27 Dec 2014 21:28:39 +0000 (22:28 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 28 Dec 2014 00:22:57 +0000 (01:22 +0100)
Add some documentation about the environment variables available with
"external-check command". Currently, only one of them is dynamically updated
on each check : HAPROXY_SERVER_CURCONN.

doc/configuration.txt

index d8063babebc5273ff6ed3b69c10118d9e9588aeb..ee3b83408b1995fa76d49a000cb0999c12ab97d0 100644 (file)
@@ -5354,9 +5354,6 @@ external-check command <command>
   Arguments :
     <command> is the external command to run
 
-  The PATH environment variable used when executing the
-  command may be set using "external-check path".
-
   The arguments passed to the to the command are:
 
   <proxy_address> <proxy_port> <server_address> <server_port>
@@ -5368,6 +5365,36 @@ external-check command <command>
   possible to determine a listener, and both <proxy_address> and <proxy_port>
   will have the string value "NOT_USED".
 
+  Some values are also provided through environment variables.
+
+  Environment variables :
+    HAPROXY_PROXY_ADDR      The first bind address if available (or empty if not
+                            applicable, for example in a "backend" section).
+
+    HAPROXY_PROXY_ID        The backend id.
+
+    HAPROXY_PROXY_NAME      The backend name.
+
+    HAPROXY_PROXY_PORT      The first bind port if available (or empty if not
+                            applicable, for example in a "backend" section or
+                            for a UNIX socket).
+
+    HAPROXY_SERVER_ADDR     The server address.
+
+    HAPROXY_SERVER_CURCONN  The current number of connections on the server.
+
+    HAPROXY_SERVER_ID       The server id.
+
+    HAPROXY_SERVER_MAXCONN  The server max connections.
+
+    HAPROXY_SERVER_NAME     The server name.
+
+    HAPROXY_SERVER_PORT     The server port if available (or empty for a UNIX
+                            socket).
+
+    PATH                    The PATH environment variable used when executing
+                            the command may be set using "external-check path".
+
   If the command executed and exits with a zero status then the check is
   considered to have passed, otherwise the check is considered to have
   failed.