Get complete visibility into your HAProxy load balancers with OpenTelemetry. You can collect metrics from HAProxy's CSV stats endpoint (via the haproxyreceiver) or from its built-in Prometheus endpoint (HAProxy 2.0+). New Relic supports both self-hosted Linux and Kubernetes deployments.
Why monitor HAProxy with OpenTelemetry
Monitor HAProxy to maintain load balancer performance, backend server health, and application reliability. OpenTelemetry provides a standardized, vendor-neutral approach to collect and analyze this data.
Key benefits
- Dimensional metrics: Rich metadata (proxy name, service name, server address) enables flexible grouping and filtering
- Vendor-neutral collection: Open-source OpenTelemetry standard avoids lock-in and integrates with existing observability pipelines
- Flexible collection methods: Choose between the haproxyreceiver (CSV stats) or Prometheus scraping, deployed via NRDOT or OTel Collector Contrib
- Automatic discovery on Kubernetes: The collector automatically discovers HAProxy pods without manual configuration for each instance
- Backend health visibility: Track backend server status, queue depths, and connection errors across your entire load balancer fleet
Use cases
Whether you're running HAProxy as a load balancer, reverse proxy, or API gateway, this monitoring helps you:
- Get notified when backend servers go down
- Detect when session limits are being reached
- Identify which frontends are experiencing error spikes
- Spot latency increases across your server pool
This integration is for high-availability deployments, microservices architectures, and any environment where HAProxy sits on the critical path of user traffic.
Supported platforms
- Amazon Linux
- Red Hat Enterprise Linux (RHEL)
- CentOS
- Ubuntu
- Debian
Collection options
You can collect HAProxy metrics using any of these approaches:
- NRDOT Collector (recommended): New Relic Distribution of OpenTelemetry — automated setup via guided install (self-hosted) or Helm chart (Kubernetes) with pre-configured HAProxy monitoring
- OTel Collector Contrib: Manual setup using the haproxyreceiver — collects metrics from the HAProxy stats endpoint
- Prometheus Receiver: For environments already using HAProxy's built-in Prometheus endpoint (HAProxy 2.0+)
Available metrics
The haproxyreceiver collects up to 27 metrics from the HAProxy stats endpoint. Each metric includes dimensional attributes like haproxy.proxy_name and haproxy.service_name for per-frontend, per-backend, and per-server visibility.
Key metrics collected:
- Session metrics: Current sessions, session rates, average session time per frontend/backend/server
- Request metrics: Total requests, request rates, denied requests, request errors, queued requests
- Connection metrics: Connection errors, retries, connection rates, total connections
- Throughput metrics: Bytes in/out per frontend, backend, and individual server
- Backend health: Active/backup server counts, failed health checks, downtime
For complete metrics and attributes reference, see HAProxy OTel metrics reference.
Next steps
Ready to start monitoring your HAProxy load balancers?
- Monitor self-hosted HAProxy with OpenTelemetry — step-by-step setup for Linux VMs or bare metal
- Monitor HAProxy on Kubernetes with OpenTelemetry — automatic pod discovery for containerized environments
- Find and query your HAProxy data — access dashboards, write NRQL queries, and troubleshoot data visibility