HAproxy Package
This package provides a Grafana Dashboard and a set of alert rules for the prometheus exporter built in HAproxy v2 (and not the haproxy_exporter).
To use this package to monitor an HAproxy battery outside the cluster you must:
-
Check that your haproxy has been built with the built-in prometheus exporter enabled:
haproxy -vvv | grep prometheus -
Enable a frontend on HAproxy that exposes the metrics:
frontend prometheusbind :8405mode httphttp-request use-service prometheus-exporterno log -
Create a
ScrapeConfigobject to make Prometheus scrape the metrics from the HAproxy hosts:apiVersion: monitoring.coreos.com/v1alpha1kind: ScrapeConfigmetadata:name: haproxy-lbnamespace: monitoringlabels:prometheus: k8sspec:staticConfigs:- labels:job: prometheustargets:- haproxy01.mydomain:8405- haproxy02.mydomain:8405