From 66c327dbe8c71383676369fbedcf849aa5b756b7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Cyril=20Bont=C3=A9?= Date: Tue, 12 Oct 2010 00:14:37 +0200 Subject: [PATCH] [DOC] stats: document the "stats admin" statement (cherry picked from commit ebf0595f9b554f22c6bccbbb6252b89cf8f25626) --- doc/configuration.txt | 52 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/doc/configuration.txt b/doc/configuration.txt index 5c8dc852f7..c0b04bfb9c 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -961,6 +961,7 @@ rsprep - X X X server - - X X source X - X X srvtimeout (deprecated) X - X X +stats admin - - X X stats auth X - X X stats enable X - X X stats hide-version X - X X @@ -4655,6 +4656,57 @@ srvtimeout (deprecated) See also : "timeout server", "timeout client" and "clitimeout". +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 + + This statement enables the statistics admin level if/unless a condition is + matched. + + The admin level allows to enable/disable servers from the web interface. By + default, statistics page is read-only for security reasons. + + Currently, there are 2 known limitations : + + - The POST data are limited to one packet, which means that if the list of + servers is too long, the request won't be processed. It is recommended + to alter few servers at a time. + + - Expect: 100-continue is not supported. + + Example : + # statistics admin level only for localhost + backend stats_localhost + stats enable + stats admin if LOCALHOST + + Example : + # statistics admin level always enabled because of the authentication + backend stats_auth + stats enable + stats auth admin:AdMiN123 + stats admin if TRUE + + Example : + # statistics admin level depends on the authenticated user + userlist stats-auth + group admin users admin + user admin insecure-password AdMiN123 + group readonly users haproxy + user haproxy insecure-password haproxy + + backend stats_auth + stats enable + acl AUTH http_auth(stats-auth) + acl AUTH_ADMIN http_auth_group(stats-auth) admin + stats http-request auth unless AUTH + stats admin if AUTH_ADMIN + + See also : "stats enable", "stats auth", "stats http-request", section 3.4 + about userlists and section 7 about ACL usage. + + stats auth : Enable statistics with authentication and grant access to an account May be used in sections : defaults | frontend | listen | backend -- 2.47.3