Step 1: Configure RDS instance

In order to setup pganalyze monitoring for Amazon RDS you'll need to first follow these steps
to enable the pg_stat_statements extension for collecting query statistics.

This guide assumes you have an already running Amazon RDS PostgreSQL server you want to monitor.

Enabling pg_stat_statements

In your AWS Console, modify your existing custom DB Parameter Group, or create a new custom DB Parameter Group:

rds parameter group

Then set the following configuration parameters:

NameNew Value 
pg_stat_statements.trackALLOptional, enables tracking of queries inside stored procedures

In case you created a new parameter group you'll have to modify your database to use the Parameter Group you created earlier:

rds enable parameter group

Enable Enhanced Monitoring

We also highly recommend turning on Enhanced Monitoring, if you haven't already - it will give you
more detailed system-level statistics that can be helpful, e.g. to debug I/O issues.

If Enhanced Monitoring is enabled, pganalyze will automatically collect and show this additional information in the dashboard as well.

Reboot your database

To enable the extension you need to reboot your database.

Note that this only needs to be done if you haven't enabled pg_stat_statements on this database before.

Verify that pg_stat_statements is enabled

Connect to your database as an RDS superuser (usually the credentials you created the database with), e.g. using psql.

Run the following SQL commands to enable the extension, and make sure it was installed correctly:

SELECT * FROM pg_stat_statements LIMIT 1;

This should return one row of query statistics information - if it gives an error you might not have restarted your database or changed the configuration correctly.

Continue by creating the monitoring user:

Proceed to Step 2: Create Monitoring User

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