• /
  • EnglishEspañolFrançais日本語한국어Português
  • Log inStart now

Find and query your HAProxy data in New Relic

|View as Markdown

After you've set up HAProxy monitoring with OpenTelemetry, your data appears in New Relic within a few minutes. This page shows you how to find your HAProxy entities, explore metrics and trace data, and write NRQL queries.

Find your HAProxy data

Query your data with NRQL

Use these example NRQL queries to analyze your HAProxy data:

-- Sessions per second across frontends
FROM Metric SELECT average(haproxy.sessions.rate)
WHERE haproxy.service_name = 'FRONTEND'
FACET haproxy.proxy_name
TIMESERIES
-- Error rates by backend
FROM Metric SELECT rate(sum(haproxy.responses.errors), 1 minute) AS 'Errors/min'
WHERE haproxy.service_name = 'BACKEND'
FACET haproxy.proxy_name
TIMESERIES
-- Bytes throughput (in + out)
FROM 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_name
TIMESERIES
-- Backend server health
FROM Metric SELECT latest(haproxy.active) AS 'Active Servers',
latest(haproxy.backup) AS 'Backup Servers'
WHERE haproxy.service_name = 'BACKEND'
FACET haproxy.proxy_name
-- Request queue depth (indicates backend saturation)
FROM Metric SELECT max(haproxy.requests.queued)
WHERE haproxy.service_name = 'BACKEND'
FACET haproxy.proxy_name
TIMESERIES

Query trace data with NRQL

If you've enabled distributed tracing with the HAProxy OTel filter, you can also query trace and span data:

-- HAProxy spans by name
FROM Span SELECT count(*)
WHERE service.name = 'YOUR_HAPROXY_SERVICE_NAME'
FACET name
SINCE 1 hour ago
-- Distributed traces flowing through HAProxy
-- Shows all services participating in traces that include HAProxy
FROM Span SELECT uniques(service.name)
WHERE trace.id IN (
SELECT uniques(trace.id) FROM Span
WHERE service.name = 'YOUR_HAPROXY_SERVICE_NAME'
SINCE 30 minutes ago LIMIT 10
)
SINCE 30 minutes ago
-- Service relationships involving HAProxy
FROM Relationship SELECT *
WHERE source.entityName = 'YOUR_HAPROXY_SERVICE_NAME'
OR target.entityName = 'YOUR_HAPROXY_SERVICE_NAME'
SINCE 1 day ago

Replace YOUR_HAPROXY_SERVICE_NAME with the service.name value configured in your HAProxy OTel filter exporter (otel.yml).

Troubleshoot data visibility

Next steps

Copyright © 2026 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.