As of 2.0.0, HAProxy includes a Prometheus exporter module that can be built into a binary during build time.
To build with the official Prometheus exporter module, make should be run with the following EXTRA_OBJS flag:
make TARGET=linux-glibc EXTRA_OBJS="contrib/prometheus-exporter/service-prometheus.o"
Once built, prometheus-exporter can be enabled in haproxy.cfg:
As of 2.0.0, HAProxy includes a Prometheus exporter module that can be built into a binary during build time.
To build with the official Prometheus exporter module,
make
should be run with the followingEXTRA_OBJS
flag:make TARGET=linux-glibc EXTRA_OBJS="contrib/prometheus-exporter/service-prometheus.o"
Once built, prometheus-exporter can be enabled in haproxy.cfg:For more infromation, see this official blog post