Skip to content

HAProxy

Auto-Discovery
Health Check
Metrics
Logs

To enable metrics gathering, Bleemeo agent needs access to HAProxy stats page and to know where it may find this page.

On HAProxy side, you will need to enable statistics page on a HTTP(S) frontend, for example:

frontend api-http
bind 0.0.0.0:80
stats enable
stats uri /statistics

On Bleemeo agent side, you need configure check by adding the following to /etc/glouton/conf.d/99-local.conf:

service:
[...]
# For a HAProxy running outside a container
- type: "haproxy"
address: "127.0.0.1"
port: 80
stats_url: "http://my-server/statistics"
# For authenticated access, use
# stats_url: "http://username:password@my-server/statistics"
- type: "haproxy"
instance: "NAME_ASSOCIATED_WITH_YOUR_ADDITIONAL_SERVICE"
address: "127.0.0.1"
port: 81
stats_url: "http://my-server:81/statistics"
# For authenticated access, use
# stats_url: "http://username:password@my-server:81/statistics"
# For a HAProxy running in a Docker container
- type: "haproxy"
instance: "CONTAINER_NAME"
address: "127.0.0.1"
port: 80
stats_url: "http://my-server/statistics"
# For authenticated access, use
# stats_url: "http://username:password@my-server/statistics"

Agent gathers the following metrics:

MetricDescription
service_statusStatus of HAProxy
haproxy_actNumber of active servers
haproxy_binNetwork traffic received from clients in bytes per second
haproxy_boutNetwork traffic sent to clients in bytes per second
haproxy_ctimeAverage time spent opening a connection in seconds
haproxy_dreqNumber of request denied by HAproxy per second
haproxy_drespNumber of response denied by HAproxy per second
haproxy_econNumber of failed connection per second
haproxy_ereqNumber of request in error per second
haproxy_erespNumber of response in error per second
haproxy_qcurNumber of currently queued requests
haproxy_qtimeAverage time request spent in queue in seconds
haproxy_req_totNumber of HTTP request per second
haproxy_rtimeAverage response time in seconds
haproxy_scurNumber of sessions opened
haproxy_stotNumber of sessions per second
haproxy_ttimeAverage time of session in seconds