---
title: Troubleshooting PostgreSQL NRDOT monitoring
source: https://docs.newrelic.com/docs/opentelemetry/db360/postgresql/troubleshooting
---

Troubleshoot common issues you may encounter when monitoring your PostgreSQL with the NRDOT Collector.

## Test connectivity [#test-connectivity]

### Test network connectivity to PostgreSQL [#test-network]

```bash
psql --host=<YOUR_DB_HOST> --port=<YOUR_DB_PORT> --username=<YOUR_DB_USERNAME> --dbname=<YOUR_DATABASE_NAME> --command 'SELECT 1;'
```

A successful connection and result confirm the monitoring user, host, and port are reachable before troubleshooting the collector itself.

### Test OTLP endpoint connectivity [#test-otlp]

Verify the NRDOT Collector can reach the New Relic OTLP endpoint:

```bash
curl -v <YOUR_NEWRELIC_OTLP_ENDPOINT>
```

## Common symptoms [#common-symptoms]

| Symptom                                                                                             | Likely cause                                                                                                                                                                          |
| --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| No `db.server.query_sample` / `db.server.top_query` events                                          | The `events` block not enabled in the receiver config (both are off by default)                                                                                                       |
| `db.server.top_query` events missing entirely                                                       | `pg_stat_statements` extension not created in that database                                                                                                                           |
| `db.server.query_sample` missing blocking-session detail                                            | Monitoring user lacks `pg_monitor`                                                                                                                                                    |
| Long queries truncated in `db.server.query_sample`                                                  | Default `track_activity_query_size` (1024 bytes); raise it, see [Compatibility and prerequisites](https://docs.newrelic.com/docs/opentelemetry/db360/postgresql/compatibility#params) |
| `postgresql.function.calls` always empty, or dashboard "Function Calls/min" widget empty            | `track_functions` not set to `pl` or `all` in `postgresql.conf`                                                                                                                       |
| Several dashboard widgets empty despite metrics flowing                                             | Those metrics are disabled by default; see [Metrics reference](https://docs.newrelic.com/docs/opentelemetry/db360/postgresql/metrics-reference#dashboard)                             |
| `db.query.comment_tags.nr_service_guid` always empty                                                | `allowed_comment_keys: [nr_service_guid]` not set on `query_sample_collection` / `top_query_collection`; empty by default                                                             |
| Table/index/function metrics missing for some tables                                                | Monitoring user lacks `SELECT` on those tables/schemas; `pg_monitor` grants stat-visibility, not object-level `SELECT`                                                                |
| `postgresql.wal.lag` / `.wal.age` missing                                                           | Requires WAL enabled with at least one connected replica; silently omitted on standalone/source-only instances, not zeroed                                                            |
| PostgreSQL entity doesn't appear, or app→PostgreSQL relationship doesn't resolve in Entity Explorer | `server.address`/`server.port` not present on the resource; the receiver alone doesn't emit these under the default (legacy) resource model                                           |

## Data not appearing in New Relic [#data-not-flowing]

-   To check for rate-limit related issues, run:

    ```sql
    SELECT * FROM NrIntegrationError
    ```

-   If data still isn't flowing, check whether there are any drop rules set on your Metric and Log events. See [Drop log data with drop filter rules](https://docs.newrelic.com/docs/logs/ui-data/drop-data-drop-filter-rules/) and [Pipeline control](https://docs.newrelic.com/docs/new-relic-control/pipeline-control/overview/).

## Related documentation [#related]

[Instrumentation in self-hosted environments](https://docs.newrelic.com/docs/opentelemetry/db360/postgresql/hosted)

Learn how to set up PostgreSQL monitoring in self-hosted environments with New Relic.

[Instrumentation in RDS environments](https://docs.newrelic.com/docs/opentelemetry/db360/postgresql/rds)

Learn how to set up PostgreSQL monitoring in RDS environments with New Relic.

[Metrics reference](https://docs.newrelic.com/docs/opentelemetry/db360/postgresql/metrics-reference)

Learn about the available metrics collected by the NRDOT Collector.
