2

I've set up HAProxy v1.7 with stats enabled and it's working fine, collecting all the necessary stats and showing them on a webpage.

Is there a built-in way to show the stats (in particular Bytes In/Out) for a specific day/week/month/year?

The only way I could think about to achieve this, is to export the .csv daily and add up the bytes... Is there any other way?

1 Answers1

1

One of the methods is to stream haproxy logs to a Time Database, like influxDB or KairosDB. And visualize them over multiple time ranges using grafana, which connects to either of the above databases.

Haproxy has capablities to send the log output using the telegraf client, which is installed in the haproxy server, and continuously sends log data to the influxDB / kairosDB backends.

https://grafana.com/

https://www.influxdata.com/

https://kairosdb.github.io/

https://www.influxdata.com/time-series-platform/telegraf/

https://github.com/influxdata/telegraf/tree/master/plugins/inputs/haproxy

https://www.influxdata.com/integration/haproxy/

In addition to the above... you can also use the bosun architecture developed by Stack Exchange itself... to help you send alerts and other communication with relation to any specific rulesets you create...

For Example: If the CPU reads from a server go above 90%, then email xyz or text abc, etc.,

http://kbrandt.com/post/bosun_arch/

apscomp
  • 11
  • 4