Skip to content

MillsyBot/HAProxy-stick-tables-exporter

 
 

Repository files navigation

HAProxy stick table exporter

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.

Install

$ pip3 install -r requirements.txt

Running

$ python3 HAProxy-stick-tables-exporter.py -m 9366

Flags

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

Stats socket

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.

About

HAProxy stick table exporter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 94.3%
  • Makefile 4.1%
  • Dockerfile 1.6%