Sign inSign up

hos7ein/haproxystats

By hos7ein

•Updated almost 6 years ago

haproxystats is a statistics collector for HAProxy load balancer

Image
0

343

hos7ein/haproxystats repository overview

⁠haproxystats-docker

⁠Introduction

haproxystats⁠ is a statistics collector for HAProxy⁠ load balancer which processes various statistics and pushes them to graphing systems (Graphite). It is designed to satisfy the following requirements:

  • Fast and configurable processing of HAProxy statistics
  • Perform aggregation when HAProxy runs in multiprocess (nbproc > 1)
  • Pull statistics at very low intervals (10secs)
  • Flexible dispatching of statistics to different systems (Graphite, kafka)

haproxystats is great tool which wrote by Pavlos Parissis⁠. I am inspired by haproxystats and have dockerized it.

⁠Build

To build haproxystats-docker, after clone the project you should run the beneath command, even though this image is published under my repository on the Docker Hub⁠ and all you need as a prerequisite is having docker on your machine.

docker build --tag hos7ein/haproxystats  .
⁠Launch a container

To launch a container you can use this instruction:

docker run -d --restart always --name [container_name] --hostname=[container_hostname] -v [path_of_haproxystats_config_file]:/etc/haproxystats/haproxystats.conf -v [path_of_haproxy_socket_files]:[path_of_socket-dir]  hos7ein/haproxystats

Notes:

  • [container_name]: The name of the container which you can choose as you wish.
  • [container_hostname]: The hostname of the container which you can choose as you wish.
  • [path_of_haproxystats_config_file]: The path to your haproxystats configuration file.
  • [path_of_haproxy_socket_files]: The path to your haproxy socket files.
  • [path_of_socket-dir]: The path of the haproxy socket files inside of container that you have set in the haproxystats.conf file.

For example:

docker run -d --restart always --name hos7ein-haproxystats --hostname=haproxystats -v /opt/haproxystats/haproxystats.conf:/etc/haproxystats/haproxystats.conf -v /var/lib/haproxy:/run/haproxy  hos7ein/haproxystats
⁠Sample shot

grafana

⁠Contact

Project website: https://github.com/hos7ein/haproxystats-docker⁠

Personal website: https://fedorafans.com⁠

Author: Hossein Aghaie [email protected]⁠

Twitter: Hossein Aghaie @hos7ein⁠

⁠License

haproxystats-docker source code is available under the GPL-3.0 License⁠.

Tag summary

Content type

Image

Digest

Size

265.8 MB

Last updated

almost 6 years ago

docker pull hos7ein/haproxystats