This is a prometheus exporter for HAProxy stick table.
Exporter will provide stick table metrics provided by echo "show table" | socat stdio /tmp/sock1
and echo "show table tablename" | socat stdio /tmp/sock1
.
Futher details provided by HAProxy docs.
$ pip3 install -r requirements.txt
$ python3 HAProxy-stick-tables-exporter.py -m 9366
Name | Description | Default |
---|---|---|
-m --metrics-port | The port that the metrics exporter will listen on | 9366 |
-c --config-file | The location of the config file | /etc/haproxy/haproxy.cfg |
-a --aggregate | To reduce cardinality of IP address aggregate them to a /24 | False |
This exporter expects to find HAProxy config file under /etc/haproxy/haproxy.cfg, and finds the socket in the config file. The user running the exporter needs permissions rw on this socket.