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:

Metric Description
service_status Status of HAProxy
haproxy_act Number of active servers
haproxy_bin Network traffic received from clients in bytes per second
haproxy_bout Network traffic sent to clients in bytes per second
haproxy_ctime Average time spent opening a connection in seconds
haproxy_dreq Number of request denied by HAproxy per second
haproxy_dresp Number of response denied by HAproxy per second
haproxy_econ Number of failed connection per second
haproxy_ereq Number of request in error per second
haproxy_eresp Number of response in error per second
haproxy_qcur Number of currently queued requests
haproxy_qtime Average time request spent in queue in seconds
haproxy_req_tot Number of HTTP request per second
haproxy_rtime Average response time in seconds
haproxy_scur Number of sessions opened
haproxy_stot Number of sessions per second
haproxy_ttime Average time of session in seconds