- Enable Performance Schema and it’s configuration
- Setup Database Access for the Agent
- Install Atatus Infrastructure Agent
Before You Begin
Enable and Configure PostgreSQL Monitoring Settings
Update the following parameters in your Aurora DB parameter group to enable performance monitoring with Atatus. For detailed guidance on these parameters, refer to the PostgreSQL documentation.Setup Database Access for the Agent
- To connect to the database, use a superuser account (or one with the necessary privileges). For example, for the
postgresdatabase, connect as thepostgressuperuser usingpsql:
Postgres ≥ 10
- Create the
atatususer and grant basic permissions:
- Create the following schema in every database:
To collect data or custom metrics that require querying additional tables, you may need to grant the SELECT permission on those tables to the atatus user. For example: grant SELECT on TABLE_NAME to atatus;. Refer to the PostgreSQL custom metric collection documentation for more details.
- Create the function in every database to enable the Agent to collect explain plans.
Postgres 9.6
- Create the
atatususer and grant basic permissions:
- Create the following schema in every database:
- Create functions in every database to enable the Agent to read the full contents of pg_stat_activity and pg_stat_statements:
To collect data or custom metrics that require querying additional tables, you may need to grant the SELECT permission on those tables to the atatus user. For example: grant SELECT on TABLE_NAME to atatus;. Refer to the PostgreSQL custom metric collection documentation for more details.
- Create the function in every database to enable the Agent to collect explain plans.
Verify
To verify the permissions are correct, run the following commands to confirm the Agent user is able to connect to the database and read the core tables:Configure Atatus Infrastructure Agent
You can connect without storing a password at all. On RDS and Aurora, the agent can authenticate with a short-lived IAM token that it signs from its own instance or task role. See Managed Authentication.
- To enable Database Monitoring for your databases, You should install the Atatus Infrastructure agent in your host machine.
-
Copy the PostgreSQL example configuration file.
- Update PostgreSQL Configuration File:
/etc/atatus-infra-agent/conf.d/postgresql.d/postgresql.yml:
-
Restart the atatus infrastructure agent and PostgreSQL service.
Collecting Schemas (Optional)
To collect schema information from PostgreSQL databases, enable thecollect_schemas option in your configuration.
Use the auto_discovery option to automatically detect and collect from all logical databases, no need to specify them individually.
Collecting Custom Metrics (Optional)
To collect custom metrics from PostgreSQL, configure thecustom_queries section in your postgresql.d/postgresql.yml file.