Telegraf Plugins used:
- 1 Telegraf:
- 1 Dashboards:
- 1 Bucket:
- 1 Label:
If you have your InfluxDB credentials configured in the CLI, you can install this template with:
HAProxy Monitoring Dashboard
HAProxy Monitoring Template
With the right HAProxy InfluxDB template by your side, monitoring these critical backend metrics has literally never been easier. The type of metrics you're talking about are designed to give you laser-focused data pertaining to your frontend, your backend and even individual servers depending on your needs in the moment.
Keep in mind that understanding the current state of your proxy at any given moment is of critical importance. This is especially true if you've already encountered issues in the past. Rather than dealing with them repeating themselves over and over again, you can fully understand the context surrounding each problem so that you can put a stop to them today before they have a chance to become much bigger (and potentially more costly) ones tomorrow.
What is HAProxy?
High Availability Proxy (HAProxy) is an open-source TCP/HTTP load balancer software and proxy server for TCP and HTTP-based applications. It can be run on Linux, Solaris, and FreeBSD to improve the performance and reliability of the server environment by distributing the workloads across multiple servers. It is used by some of the highest-traffic websites worldwide.
One of the most important things for you to understand about all of this is that HAProxy is not, in and of itself, a web server. It is simply a tool designed to help you get more out of the investment you've already made. It's quite a successful one, at that - having been used by a number of notable websites including but not limited to ones like GoDaddy, GitHub, Speedtest.net, Tumblr and even one of the largest social networking sites in existence, Twitter.
Why monitor HAProxy?
Since the purpose of HAProxy is to improve the performance of your web applications, it is important to collect metrics to gain visibility into HAProxy’s performance as well. These insights will easily detect and resolve issues proactively ensuring the health of your HAProxy instance — and importantly, ensure the performance and reliability of your server environment.
This template uses the HAProxy Telegraf Plugin to collect metrics about HAProxy and store them in InfluxDB, which is then presented in the included dashboard.
How to use the HAProxy Monitoring Template
Once your InfluxDB credentials have been properly configured in the CLI, you can install the HAProxy monitoring template using the Quick Install command. Once installed, the data for the dashboard will be populated by the included Telegraf configuration, which includes the relevant HAProxy metrics.
Note that you might need to customize the input configuration to better serve your needs, including by specifying a new input value. In addition, you need to specify the HAProxy instance that you want to monitor. You can pass the name and port of the host as a variable. If you do have more than one instance of HAProxy, please edit the haproxy.yml to add the other hosts.
To find out more information about environmental variables within the Telegraf configuration, consult the following link.
Key HAProxy monitoring metrics to monitor
Some of the most important HAProxy monitoring metrics that you should proactively monitor include:
- CPU usage
- Memory consumption
- Queue size
- Total responses by http code
- Bytes Out
- Number of http requests received
- Server up
- Denied requests
- Number of requests errors