diff --git a/doc/configuration.txt b/doc/configuration.txt index 3c34349ba..3c245abad 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -5983,7 +5983,7 @@ srvtimeout (deprecated) stats admin { if | unless } Enable statistics admin level if/unless a condition is matched May be used in sections : defaults | frontend | listen | backend - no | no | yes | yes + no | yes | yes | yes This statement enables the statistics admin level if/unless a condition is matched. @@ -6036,7 +6036,7 @@ stats admin { if | unless } stats auth : Enable statistics with authentication and grant access to an account May be used in sections : defaults | frontend | listen | backend - yes | no | yes | yes + yes | yes | yes | yes Arguments : is a user name to grant access to @@ -6085,7 +6085,7 @@ stats auth : stats enable Enable statistics reporting with default settings May be used in sections : defaults | frontend | listen | backend - yes | no | yes | yes + yes | yes | yes | yes Arguments : none This statement enables statistics reporting with default settings defined @@ -6123,7 +6123,7 @@ stats enable stats hide-version Enable statistics and hide HAProxy version reporting May be used in sections : defaults | frontend | listen | backend - yes | no | yes | yes + yes | yes | yes | yes Arguments : none By default, the stats page reports some useful status information along with @@ -6182,7 +6182,7 @@ stats http-request { allow | deny | auth [realm ] } stats realm Enable statistics and set authentication realm May be used in sections : defaults | frontend | listen | backend - yes | no | yes | yes + yes | yes | yes | yes Arguments : is the name of the HTTP Basic Authentication realm reported to the browser. The browser uses it to display it in the pop-up @@ -6222,7 +6222,7 @@ stats realm stats refresh Enable statistics with automatic refresh May be used in sections : defaults | frontend | listen | backend - yes | no | yes | yes + yes | yes | yes | yes Arguments : is the suggested refresh delay, specified in seconds, which will be returned to the browser consulting the report page. While the @@ -6264,7 +6264,7 @@ stats refresh stats scope { | "." } Enable statistics and limit access scope May be used in sections : defaults | frontend | listen | backend - yes | no | yes | yes + yes | yes | yes | yes Arguments : is the name of a listen, frontend or backend section to be reported. The special name "." (a single dot) designates the @@ -6305,7 +6305,7 @@ stats scope { | "." } stats show-desc [ ] Enable reporting of a description on the statistics page. May be used in sections : defaults | frontend | listen | backend - yes | no | yes | yes + yes | yes | yes | yes is an optional description to be reported. If unspecified, the description from global section is automatically used instead. @@ -6330,6 +6330,11 @@ stats show-desc [ ] stats show-legends + Enable reporting additional information on the statistics page + May be used in sections : defaults | frontend | listen | backend + yes | yes | yes | yes + Arguments : none + Enable reporting additional information on the statistics page : - cap: capabilities (proxy) - mode: one of tcp, http or health (proxy) @@ -6347,7 +6352,7 @@ stats show-legends stats show-node [ ] Enable reporting of a host name on the statistics page. May be used in sections : defaults | frontend | listen | backend - yes | no | yes | yes + yes | yes | yes | yes Arguments: is an optional name to be reported. If unspecified, the node name from global section is automatically used instead. @@ -6375,7 +6380,7 @@ stats show-node [ ] stats uri Enable statistics and define the URI prefix to access them May be used in sections : defaults | frontend | listen | backend - yes | no | yes | yes + yes | yes | yes | yes Arguments : is the prefix of any URI which will be redirected to stats. This prefix may contain a question mark ('?') to indicate part of a diff --git a/src/cfgparse.c b/src/cfgparse.c index c2c188695..19c559957 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -1971,7 +1971,6 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm) curproxy->timeout.tarpit = defproxy.timeout.tarpit; curproxy->timeout.httpreq = defproxy.timeout.httpreq; curproxy->timeout.httpka = defproxy.timeout.httpka; - curproxy->uri_auth = defproxy.uri_auth; curproxy->mon_net = defproxy.mon_net; curproxy->mon_mask = defproxy.mon_mask; if (defproxy.monitor_uri) @@ -2007,6 +2006,7 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm) } curproxy->mode = defproxy.mode; + curproxy->uri_auth = defproxy.uri_auth; /* for stats */ /* copy default logsrvs to curproxy */ list_for_each_entry(tmplogsrv, &defproxy.logsrvs, list) { @@ -3284,9 +3284,6 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm) LIST_ADDQ(&curproxy->sticking_rules, &rule->list); } else if (!strcmp(args[0], "stats")) { - if (warnifnotcap(curproxy, PR_CAP_BE, file, linenum, args[0], NULL)) - err_code |= ERR_WARN; - if (curproxy != &defproxy && curproxy->uri_auth == defproxy.uri_auth) curproxy->uri_auth = NULL; /* we must detach from the default config */