HAProxy¶
HAProxy is a free, very fast and reliable solution offering high availability, load balancing, and proxying for TCP and HTTP-based applications.
The Librato Agent allows you to easily monitor the health
of your HAProxy server and the respective front-end and backend proxies. We use collectd’s Python-based HAProxy plugin to gather
metrics from your running HAProxy instances. It requires that the stats
socket is configured and enabled.
Installation¶
The HAProxy integration depends on the Librato Agent. If you haven’t already, you will first need to install the Librato Agent. Once this is complete, select the HAProxy icon in the integrations catalogue.
Toggle the Enabled switch to activate the HAProxy integration on your Librato account and create the preconfigured HAProxy Space.
At this point your integration is complete and any HAProxy metrics associated with this integration will be allowed through your Librato Agent service-side filters.
Plugin Configuration¶
The HAProxy setup being monitored must have the stats
socked
enabled. You must also be running HAProxy 1.4 or higher.
By default, we will monitor the overall health of HAProxy and the health of your backend proxies and front-end proxies. However, this can be adjusted to exclude certain proxies. Here is a sample definition that monitors all aspects of a HAProxy setup.
<Plugin python>
ModulePath "/opt/collectd/share/collectd"
Import "collectd-haproxy"
<Module "collectd-haproxy">
Socket "/run/haproxy/admin.sock"
ProxyMonitor "server"
ProxyMonitor "frontend"
ProxyMonitor "backend"
</Module>
</Plugin>
To disable monitoring for a specific proxy, you can remove the respective ProxyMonitor setting. Additionally, you can adjust the location of the stats socket as this socket’s location can vary from different versions of HAProxy.
HAProxy Workspace¶
Visit your preconfigured Space to observe your new metrics as they stream in. You can use this Space to monitor the performance of your front-end and backend proxies along with the overall health of your HAProxy configuration.
FAQ¶
For specific answers to Librato Agent questions check out our Librato Agent FAQ.
Let us know what you think when you take this for a spin. We would love to incorporate your feedback and any new dashboards you design into the ongoing development of this key server monitoring technology.