• /
  • EnglishEspañolFrançais日本語한국어Português
  • EntrarComeçar agora

Install & configure NRDOT for PostgreSQL monitoring with CLI

|View as Markdown (English)

You can install and configure the NRDOT Collector for PostgreSQL monitoring using the New Relic CLI. The CLI installs the collector, creates the monitoring role and its grants, and configures the collector in a single command.

Prerequisites

  • A New Relic account with a valid license key.
  • A New Relic account ID.
  • PostgreSQL 14 or later.
  • A Linux collector host running Debian/Ubuntu or RHEL/CentOS, with curl and systemd installed, and the psql client available.
  • pg_stat_statements must be loaded via shared_preload_libraries. The installer checks this and fails if it isn't. See Server-level prerequisites below.
  • For self-hosted PostgreSQL: administrative access to your PostgreSQL server (the postgres superuser or equivalent).
  • For AWS RDS/Aurora PostgreSQL: network connectivity from the collector host to the RDS endpoint (inbound access on the PostgreSQL port in the RDS security group), and the RDS master username and password.
  • Network connectivity to New Relic OTLP endpoint for your region.

For detailed requirements, refer to Compatibility.

Server-level prerequisites

pg_stat_statements can't be created without shared_preload_libraries, and that parameter requires a database restart, so the CLI can't configure it for you. Put these parameters in place before running the install:

Parameter

Value

shared_preload_libraries

pg_stat_statements

pg_stat_statements.track

ALL

pg_stat_statements.max

10000

pg_stat_statements.save

on

track_activity_query_size

4096

track_functions

all

  • Self-hosted: set these in postgresql.conf, then restart PostgreSQL. Some distributions need the postgresql-contrib package installed for pg_stat_statements to be available.
  • AWS RDS or Aurora: set these in the DB parameter group, not a config file. track_activity_query_size and pg_stat_statements.max are static parameters: apply them with apply_method: pending-reboot, then reboot the instance. For Aurora, the parameter-group family name must match your engine's major version exactly, for example aurora-postgresql16.

Install and configure the NRDOT Collector

Find and use your data

Once your data is being collected, you can access comprehensive PostgreSQL database monitoring through the New Relic UI.

To find your PostgreSQL database entity in New Relic:

  1. Go to one.newrelic.com > All capabilities > Databases.
  2. From the Entity type dropdown, select PostgreSQL instance, then click Apply.
  3. Select your PostgreSQL database from the list of entities.

To confirm data is arriving, run this query in the query builder:

SELECT count(*) FROM Metric
WHERE metricName LIKE 'postgresql.%'
AND instrumentation.provider = 'opentelemetry'
SINCE 10 minutes ago

Introduction to PostgreSQL monitoring with NRDOT

Learn about all the available installation methods for PostgreSQL monitoring with New Relic.

Ansible install

Learn how to install and configure PostgreSQL monitoring at scale with the newrelic.newrelic_install Ansible role.

Chef install

Learn how to install and configure PostgreSQL monitoring at scale with the newrelic-install Chef cookbook.

Helm chart install

Learn how to install and configure PostgreSQL monitoring on Kubernetes with the postgresql-otel Helm chart.

Docker install

Learn how to run the NRDOT Collector as a sibling container to a PostgreSQL instance already running in Docker.

Copyright © 2026 New Relic Inc.

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