banshee/services-collection/services/haproxy/https/
stats
The state, sessions and errors of each frontend, backend and server of an HAProxy, from its CSV statistics page.
par banshee1 installation1 version
v1Dernière
Publiée le 27 octobre 2026. First version.
HAProxy statistics
Returns, for each frontend, backend and server of an HAProxy load balancer, its state, its current sessions against their limit, and its errors per second, read from its statistics page in CSV over HTTP. Five watches are offered, each one set on the probe.
Versions
Generic: the CSV of the statistics page is the same from HAProxy 1.5 to 3.x, new columns being added at its end; each column is found by its name in the first line. The Data Plane API is not read here.
How it works
One GET to the address of the statistics page, ;csv added when the address does not carry it (the form the HAProxy management guide gives); nothing else is sent. The first line names the columns:
# pxname,svname,qcur,qmax,scur,smax,slim,stot,bin,bout,dreq,dresp,ereq,econ,eresp,wretr,wredis,status,weight,act,bck,...,type,...
www,FRONTEND,,,12,80,2000,5120,...,OPEN,...,0,...
www,web1,0,0,5,40,,2400,...,UP,...,2,...
www,BACKEND,0,0,5,40,200,2400,...,UP,...,1,... - An instance is
<pxname>/<svname>:www/FRONTEND,www/web1,www/BACKEND. The listening sockets (type3) are left out. statusis the first word of the columnstatus, in capitals:OPENfor a frontend that accepts,UP,DOWN,MAINT,DRAIN,NOLB; a server without health check readsNO CHECK. During a change the column readsUP 1/3(going down) orDOWN 1/2(coming up): the state it still has,UPorDOWN, is returned.sessionsisscur;sessions-percentisscuragainstslim, only when a limit is set (maxconnof the frontend, the backend or the server).errorsis the rate ofereq+econ+eresp(request errors, connection errors, response errors) between this run and the previous one, per second; it comes from the second run on.- A load balancer that refuses the connection, or does not answer in the delay of
protocol:http:timeout, is critical: "HAProxy down". A code 401, 403 or 404 stops the collectormisconfigured; any other code but 200unreachable. A page that is not the CSV of the statistics stops itmisconfigured.
Prerequisites
- A statistics page served by HAProxy, open to the poller's address, for instance:
frontend stats
bind :8404
stats enable
stats uri /stats
stats auth monitoring:<a password>
acl poller src 192.0.2.10
http-request deny unless poller 192.0.2.10 stands for the poller's address. stats auth is optional; without stats admin, the page only reads.
- Its full address in the variable
haproxy:url, reachable from the poller. - With
stats auth, the account inprotocol:http:userandprotocol:http:password, served onhttps://: an account never goes tohttp://(put the page behindbind :8404 ssl crt …).
Variables
| Name | Label | Says | Default |
|---|---|---|---|
haproxy:url | Statistics page address | the address of the statistics page; the collector adds ;csv | — |
Outputs
| Name | Label | Unit | Per instance |
|---|---|---|---|
status | State | — | yes, per frontend, backend or server |
sessions | Current sessions | — | yes |
sessions-percent | Sessions against their limit | % | yes |
errors | Errors | errors/s | yes |
Watches
| Name | Title | Kind | Defaults | Checked by default |
|---|---|---|---|---|
down | Down | state to avoid, on status | critical on DOWN | yes |
maintenance | In maintenance or draining | state to avoid, on status | warning on MAINT, DRAIN, NOLB | no |
saturation | Sessions near their limit | above a threshold, on sessions-percent | warning above 80 %, critical above 95 % | yes |
errors | Errors | above a threshold, on errors | warning above 1 error/s, for 3 runs | no |
missing | Frontend, backend or server missing | expected instances, on status | no name given: it raises nothing until names are set on the probe | no |
A backend whose servers are all down reads DOWN itself: "Down" raises on it and on each of its servers. A server taken out on purpose reads MAINT, which "Down" does not raise; leave it out by the selection of the probe, or check "In maintenance or draining".
Limits
- With several processes (
nbproc, before HAProxy 2.5), the page shows only the process that answers. - A reload sets the counters back to zero: the error rate is skipped for one run.
- An address that already carries
;csvis used as is. - Not checked against an HAProxy: the columns are those the management guide of HAProxy lists for the CSV statistics (docs.haproxy.org).