banshee est en développement actif : les collecteurs vont encore changer, et une version que vous publiez demandera sans doute des ajustements. Pour un usage stable, attendez la version 1.0.0.

Services

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.

  • services
  • haproxy
  • load balancer
  • proxy
  • stats
  • csv
  • http
  • https

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 (type 3) are left out.
  • status is the first word of the column status, in capitals: OPEN for a frontend that accepts, UP, DOWN, MAINT, DRAIN, NOLB; a server without health check reads NO CHECK. During a change the column reads UP 1/3 (going down) or DOWN 1/2 (coming up): the state it still has, UP or DOWN, is returned.
  • sessions is scur; sessions-percent is scur against slim, only when a limit is set (maxconn of the frontend, the backend or the server).
  • errors is the rate of ereq + 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 collector misconfigured; any other code but 200 unreachable. A page that is not the CSV of the statistics stops it misconfigured.

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 in protocol:http:user and protocol:http:password, served on https://: an account never goes to http:// (put the page behind bind :8404 ssl crt …).

Variables

NameLabelSaysDefault
haproxy:urlStatistics page addressthe address of the statistics page; the collector adds ;csv—

Outputs

NameLabelUnitPer instance
statusState—yes, per frontend, backend or server
sessionsCurrent sessions—yes
sessions-percentSessions against their limit%yes
errorsErrorserrors/syes

Watches

NameTitleKindDefaultsChecked by default
downDownstate to avoid, on statuscritical on DOWNyes
maintenanceIn maintenance or drainingstate to avoid, on statuswarning on MAINT, DRAIN, NOLBno
saturationSessions near their limitabove a threshold, on sessions-percentwarning above 80 %, critical above 95 %yes
errorsErrorsabove a threshold, on errorswarning above 1 error/s, for 3 runsno
missingFrontend, backend or server missingexpected instances, on statusno name given: it raises nothing until names are set on the probeno

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 ;csv is 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).