This page provides a complete reference for all HAProxy metrics collected via OpenTelemetry, including the haproxyreceiver and Prometheus receiver paths.
Overview
The HAProxy OpenTelemetry integration collects metrics from the HAProxy CSV stats endpoint via the haproxyreceiver. Metrics are organized into two tiers:
- Default metrics (17): Collected automatically with default configuration — sufficient for most monitoring use cases
- Optional metrics (16): Disabled by default, enabled individually in the receiver
metricssection — useful for detailed debugging and capacity planning
When using the NRDOT guided install, you can choose between two configurations:
- Optimized (lower ingest): 17 default metrics, 60s collection interval, optimization processors applied
- Comprehensive (full detail): 27 metrics (17 default + 10 optional), 15s collection interval
팁
To enable optional metrics, add them to the metrics section of your haproxy receiver configuration with enabled: true. See Monitor self-hosted HAProxy with OpenTelemetry for configuration details.
Default metrics
These 17 metrics are collected with default configuration (no metrics section needed).
Metric name | Description | Type | Unit |
|---|---|---|---|
| Total bytes received by the proxy (collected per frontend, backend, and server) | Sum (cumulative) | By |
| Total bytes sent by the proxy (collected per frontend, backend, and server) | Sum (cumulative) | By |
| Total number of connection errors (backend and server only) | Sum (cumulative) | {errors} |
| Number of connections per second over the last elapsed second (frontend only) | Gauge | {connections}/s |
| Total number of connection retries (backend and server only) | Sum (cumulative) | {retries} |
| Total number of denied requests (frontend and backend) | Sum (cumulative) | {requests} |
| Total number of request errors (frontend only) | Sum (cumulative) | {errors} |
| Current number of queued requests (backend and server only) | Gauge | {requests} |
| Number of HTTP requests per second over the last elapsed second (frontend only) | Gauge | {requests}/s |
| Total number of request redispatches (backend and server only) | Sum (cumulative) | {requests} |
| Total number of HTTP requests received (frontend and backend) | Sum (cumulative) | {requests} |
| Total number of denied responses (frontend, backend, and server) | Sum (cumulative) | {responses} |
| Total number of response errors (backend and server only) | Sum (cumulative) | {errors} |
| Total number of times a server was selected for load balancing (backend and server) | Sum (cumulative) | {selections} |
| Average total session time over the last 1024 requests, in seconds (backend and server) | Gauge | s |
| Current number of active sessions (frontend, backend, and server) | Gauge | {sessions} |
| Number of sessions per second over the last elapsed second (frontend, backend, and server) | Gauge | {sessions}/s |
Optional metrics
These 16 metrics are disabled by default. Enable them individually in your collector configuration by setting enabled: true in the receiver's metrics section.
The NRDOT comprehensive configuration enables the first 10 of these (marked with [C]).
Metric name | Description | Type | Unit |
|---|---|---|---|
| Average connection time in seconds (latency monitoring) | Gauge | s |
| Average queue time for requests in seconds | Gauge | s |
| Average response time in seconds | Gauge | s |
| Number of active servers in a backend | Gauge | {servers} |
| Number of backup servers in a backend | Gauge | {servers} |
| Total downtime in seconds | Sum (cumulative) | s |
| Total number of failed health checks | Sum (cumulative) | {checks} |
| Server weight (used in load balancing decisions) | Gauge | {weight} |
| Total cumulative number of sessions | Sum (cumulative) | {sessions} |
| Total cumulative number of connections | Sum (cumulative) | {connections} |
| Total number of bytes submitted to the compressor | Sum (cumulative) | By |
| Total number of bytes emitted by the compressor | Sum (cumulative) | By |
| Total number of bytes that bypassed compression | Sum (cumulative) | By |
| Total number of HTTP responses that were compressed | Sum (cumulative) | {responses} |
| Total number of data transfers aborted by the client | Sum (cumulative) | {cancellations} |
| Configured session limit for the proxy | Gauge | {sessions} |
Resource attributes
The following resource attributes are attached to all HAProxy metrics, providing context for filtering and grouping.
Attribute | Description | Example value |
|---|---|---|
| Name of the HAProxy proxy (from the frontend/backend/listen section name in haproxy.cfg) |
|
| Type identifier or server name: |
|
| The stats endpoint URL that was scraped (used as part of entity identifier) |
|
| Unique identifier of the host (from |
|
| Hostname of the machine running the collector |
|
| Operating system type |
|
Entity identifier: The HAProxy entity in New Relic is synthesized from host.id + haproxy.addr (for example ec23da5ead46571f2c3a9771b093658b:http://localhost:8404/stats).
Prometheus metric mapping
If you're using the Prometheus receiver path, the following table shows how HAProxy Prometheus metric names map to the OTel haproxyreceiver equivalents. Each OTel metric may have multiple Prometheus sources (one per tier: frontend, backend, server).
OTel metric | Prometheus frontend | Prometheus backend | Prometheus server |
|---|---|---|---|
|
|
|
|
|
|
|
|
| — |
|
|
|
| — | — |
| — |
|
|
|
|
| — |
|
| — | — |
| — |
|
|
|
| — | — |
| — |
|
|
|
|
| — |
|
|
|
|
| — |
|
|
| — |
|
|
| — |
|
|
|
|
|
|
|
|
|
|
중요
Known limitations of the Prometheus path:
- No per-status-code FACET: The haproxyreceiver parses
hrsp_*CSV fields into astatus_codeattribute onhaproxy.requests.total. The Prometheus path does not support this — HTTP response code breakdown is available only as separate metrics (haproxy_frontend_http_responses_total{code="2xx"}) not included in the transform config. - Rate metrics are lifetime maximums:
haproxy.connections.ratemaps tohaproxy_frontend_connections_rate_maxandhaproxy.requests.ratemaps tohaproxy_frontend_http_requests_rate_max. These are lifetime max values, not instantaneous rates. For true current rates, use therate()NRQL function on cumulative counter metrics. - ~136 Prometheus metrics have no OTel equivalent: HAProxy's Prometheus endpoint exposes ~204 metrics. Only 36 are mapped to the 17 OTel default metrics (across frontend/backend/server tiers). The remainder (process internals, health check details, DNS resolver stats) have no haproxyreceiver equivalent.
Sample NRQL queries
Use these queries to explore your HAProxy metrics in New Relic:
-- Current sessions across all frontendsFROM Metric SELECT latest(haproxy.sessions.count)FACET haproxy.proxy_nameWHERE haproxy.service_name = 'FRONTEND'
-- Request rate per frontend over timeFROM Metric SELECT average(haproxy.requests.rate)FACET haproxy.proxy_nameWHERE haproxy.service_name = 'FRONTEND'TIMESERIES
-- Backend error rate (responses.errors as rate)FROM Metric SELECT rate(sum(haproxy.responses.errors), 1 second)FACET haproxy.proxy_nameWHERE haproxy.service_name = 'BACKEND'TIMESERIES
-- Bytes throughput per backendFROM Metric SELECT rate(sum(haproxy.bytes.input), 1 minute) AS 'Bytes In/min', rate(sum(haproxy.bytes.output), 1 minute) AS 'Bytes Out/min'FACET haproxy.proxy_nameWHERE haproxy.service_name = 'BACKEND'
-- Average session time per backend (latency indicator)FROM Metric SELECT average(haproxy.sessions.average)FACET haproxy.proxy_nameWHERE haproxy.service_name = 'BACKEND'
-- Per-server session count (individual backend servers)FROM Metric SELECT latest(haproxy.sessions.count)FACET haproxy.proxy_name, haproxy.service_nameWHERE haproxy.service_name NOT IN ('FRONTEND', 'BACKEND')
-- Queued requests (indicates backend saturation)FROM Metric SELECT max(haproxy.requests.queued)FACET haproxy.proxy_nameWHERE haproxy.service_name = 'BACKEND'TIMESERIESNext steps
- Find and query your HAProxy data — dashboards, NRQL queries, and data navigation
- Monitor self-hosted HAProxy — setup for Linux VMs or bare metal
- Monitor HAProxy on Kubernetes — automatic pod discovery for containerized environments
- Create NRQL alert conditions — set up alerts based on your HAProxy metrics