Find and fix slow Postgres queries on Supabase & Neon: pganalyze now supports both platforms

Step 4: Configure the Collector

The collector configuration file lives in /etc/pganalyze-collector.conf, and looks like this:

[pganalyze]
api_key = your_pga_organization_api_key

[server1]
db_host = ep-your-endpoint-id.your-region.aws.neon.tech
db_name = your_database_name
db_username = pganalyze
db_password = your_monitoring_user_password
db_sslmode = require

Fill in the values step-by-step:

  1. The api_key can be found in the pganalyze Settings page for your organization, under the API Access tab
  2. The db_host is the compute endpoint hostname for the branch you want to monitor, of the form ep-<endpoint-id>.<region>.aws.neon.tech. You can copy the full connection string from the Connect dialog in the Neon Console for the branch in question
  3. The db_name is the database on that branch you want to monitor
  4. The db_username and db_password should be the credentials of the monitoring user we created in Step 1

The collector automatically detects that this is a Neon branch from the db_host suffix (.neon.tech), so no further platform-specific configuration is required. Note that Neon doesn’t expose host-level system metrics (CPU, memory, disk) through an API the collector can use, so pganalyze will show query and schema statistics for your branch, but not the System Overview metrics available for other platforms.

Testing the new configuration

Run the following to make sure the configuration works:

sudo pganalyze-collector --test

Once you’ve confirmed the install is successful and you’re receiving query data in pganalyze, we recommend setting up Log Insights as a follow-up step, to automatically track log events in your database.


Couldn't find what you were looking for or want to talk about something specific?
Start a conversation with us →