---
title: Find and query your HAProxy data in New Relic
source: https://docs.newrelic.com/docs/opentelemetry/integrations/haproxy/find-and-query-data
---

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 write NRQL queries.

## Find your HAProxy data [#find-data]

**Use the entity explorer**

1.  Go to **[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > All entities**.
2.  Search for your HAProxy entities by name, or filter by entity type `HAPROXYINSTANCE`.
3.  Select an entity to view the summary page with golden metrics (sessions per second, requests per second, connection errors).

**Use Integrations & Agents**

1.  Go to **[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > Integrations & Agents**.
2.  Click **Dashboards**.
3.  Search for **HAProxy (OpenTelemetry Collector)** and select it.
4.  Click **View dashboard** to see pre-built visualizations for your HAProxy metrics.

**Use the query builder**

1.  Go to **[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities) > Query your data**.
2.  Run a query to find your HAProxy data:
    ```sql
    FROM Metric SELECT uniques(metricName)
    WHERE metricName LIKE 'haproxy.%'
    SINCE 1 hour ago
    ```

## Query your data with NRQL [#query-data]

Use these example NRQL queries to analyze your HAProxy data:

```sql
-- 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
```

## Troubleshoot data visibility [#troubleshoot]

**No data appears in New Relic**

-   Allow a few minutes for initial data ingestion.
-   Check the time range — ensure you're looking at recent data (last 30 minutes).
-   Query for any HAProxy metrics:
    ```sql
    FROM Metric SELECT count(*) WHERE metricName LIKE 'haproxy.%' SINCE 30 minutes ago
    ```
-   Verify the collector is running:

    ```bash
    # Self-hosted
    sudo systemctl status otelcol-contrib
    # or
    sudo systemctl status nrdot-collector

    # Kubernetes
    kubectl get pods -n newrelic
    kubectl logs -n newrelic -l app.kubernetes.io/name=nr-k8s-otel-collector
    ```
-   Check that the HAProxy stats endpoint is accessible from the collector.

**Data appears intermittent**

-   Check collector logs for errors:

    ```bash
    # Self-hosted
    sudo journalctl -u otelcol-contrib -n 50 --no-pager

    # Kubernetes
    kubectl logs -n newrelic deploy/nr-k8s-otel-collector-deployment --tail=50
    ```
-   Verify HAProxy stats endpoint is consistently accessible.
-   Check for network connectivity issues between the collector and New Relic's OTLP endpoint.
-   Ensure HAProxy isn't rate-limiting stats endpoint requests.

## Next steps [#next-steps]

-   [HAProxy OTel metrics reference](https://docs.newrelic.com/docs/opentelemetry/integrations/haproxy/metrics-reference/) — complete metrics reference with descriptions
-   [Introduction to NRQL](https://docs.newrelic.com/docs/nrql/get-started/introduction-nrql-new-relics-query-language/) — learn New Relic's query language for advanced analysis
-   [Create NRQL alert conditions](https://docs.newrelic.com/docs/alerts/create-alert/create-alert-condition/create-nrql-alert-conditions/) — set up alerts based on your HAProxy metrics
-   [Monitor self-hosted HAProxy](https://docs.newrelic.com/docs/opentelemetry/integrations/haproxy/self-hosted/) — setup for Linux VMs or bare metal
-   [Monitor HAProxy on Kubernetes](https://docs.newrelic.com/docs/opentelemetry/integrations/haproxy/kubernetes/) — automatic pod discovery for containerized environments
