HAProxy exporter
|
|
The HAProxy exporter is used to extract statistics on incoming and outgoing connections, as well as the status of backends and servers from the HAProxy.
Classically, it connects to a socket, which is why the corresponding authorizations must be set here.
|
From HAProxy version 2.0, a corresponding endpoint is included in HAProxy. This exporter is therefore no longer necessary. |
Configuration
Native integration
From HAProxy 2.0, the following configuration can be set in HAProxy to open the VIMON endpoint:
frontend vimon
bind *:9101
option http-use-htx (option removed > haproxy 2.5)
http-request use-service prometheus-exporter if { path /metrics }
stats enable
stats uri /stats
stats refresh 10s
Exporter integration
If the exporter is used, the socket must be activated in HAProxy, e.g.:
global
stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners
The HAProxy exporter must also be installed in VIMON.
The socket must then be linked here in vimon/config/haproxy_exporter/haproxy_exporter.conf:
SOCKETPATH=unix:/run/haproxy/admin.sock