Overview
HAProxy is a widely used open-source load balancer and reverse proxy for TCP and HTTP applications. Xitoring's HAProxy integration collects traffic statistics, session counts, error rates, and backend health metrics — giving you full visibility into your load balancing infrastructure.
What Can It Monitor?
- Queued Requests — Requests waiting in the queue for a backend server
- Sessions — Active sessions across frontends and backends
- Request Bytes — Incoming data throughput
- Response Bytes — Outgoing data throughput
- Requests per Second — Rate of incoming requests
- 2XX Requests — Successful response count
- 4XX Requests — Client error response count
- 5XX Requests — Server error response count
- Last Sessions — Most recent session activity
- Rate — Current connection rate
Prerequisites
You need to enable HAProxy's built-in statistics page before activating the integration.
On Linux
Edit your HAProxy configuration file:
vim /etc/haproxy/haproxy.cfg
Add the following stats configuration:
listen stats
bind localhost:8404
stats enable
stats uri /
Restart HAProxy:
sudo systemctl restart haproxy
The statistics page is now available at http://127.0.0.1:8404/?stats.
On Windows
Open your HAProxy configuration file (haproxy.cfg) in a text editor and add the same stats configuration:
listen stats
bind localhost:8404
stats enable
stats uri /
Restart HAProxy for changes to take effect.
How to Activate the Integration
Run the Xitogent CLI:
xitogent integrate
Select HAProxy from the list of available integrations. When prompted, enter the URL where the statistics page is served:
http://127.0.0.1:8404
The config file is created at /etc/xitogent/integrations/haproxy_integration.conf.
Setting Up Triggers
Available trigger parameters:
- Queued Requests
- Sessions
- Request Bytes / Response Bytes
- Requests per Second
- 2XX / 4XX / 5XX Request counts
- Last Sessions
- Rate
Navigate to Triggers on your server page, select HAProxy, choose a metric, set your threshold, and configure notification channels.
Tips
- Always bind the stats page to
localhostto prevent public exposure - Monitor 5XX Requests to catch backend failures immediately
- Set alerts on Queued Requests — a growing queue means backends can't keep up
- Track Sessions to plan capacity and detect traffic spikes
- Works on both Linux and Windows servers