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.
HAProxy Metrics and tags¶
The HAProxy integration supports the following metrics and tags.
Note: All metrics are prefixed with librato.haproxy.
.
Tag Name | Description |
---|---|
host | Host name or IP address of monitored HAProxy configuration |
Server Health Metrics¶
Name | Description | Tags |
queue_current | Current number of queued requests | host |
Front-end Metrics¶
Name | Description | Tags |
frontend.request_rate | Request rate | host |
frontend.session_current | Current number of sessions | host |
frontend.session_rate | Session rate | host |
frontend.bytes_in | Number of Bytes In | host |
frontend.bytes_out | Number of Bytes Out | host |
frontend.denied_request | Denied requests | host |
frontend.denied_response | Denied responses | host |
frontend.error_request | Request errors | host |
frontend.response_1xx | Number of 1xx responses | host |
frontend.response_2xx | Number of 2xx responses | host |
frontend.response_3xx | Number of 3xx responses | host |
frontend.response_4xx | Number of 4xx responses | host |
frontend.response_5xx | Number of 5xx responses | host |
frontend.response_other | Number of other reponses | host |
frontend.session_total | Total number of sessions | host |
Backend Metrics¶
Name | Description | Tags |
backend.queue_current | Current number of queued requests | host |
backend.session_rate | Session rate | host |
backend.session_total | Total number of sessions | host |
backend.bytes_in | Number of Bytes In | host |
backend.bytes_out | Number of Bytes Out | host |
backend.denied_request | Denied requests | host |
backend.denied_response | Denied responses | host |
backend.downtime | Total downtime | host |
backend.error_connection | Connection errors | host |
backend.error_response | Response errors | host |
backend.redistributed | Redistributed requests | host |
backend.request_rate | Request rate | host |
backend.response_1xx | Number of 1xx responses | host |
backend.response_2xx | Number of 2xx responses | host |
backend.response_3xx | Number of 3xx responses | host |
backend.response_4xx | Number of 4xx responses | host |
backend.response_5xx | Number of 5xx responses | host |
backend.response_other | Number of other reponses | host |
backend.retries | Number of retries | host |
backend.session_total | Total number of sessions | host |
FAQ¶
For specific answers to Librato Agent questions check out our Librato Agent FAQ.
Please let us know what you think about this integration. We would love to incorporate your feedback and any ideas you have on dashboard design into the ongoing development of our integrations.