- Configure Cloud SQL Database Flags
- Setup Database Access for the Agent
- Configure Atatus Infrastructure Agent
Before You Begin
Configure Cloud SQL Database Flags
In the Google Cloud Console, open your Cloud SQL instance and edit its Database flags, then restart the instance.Setup Database Access for the Agent
Connect to thepostgres database as a superuser. On Cloud SQL, the built-in postgres user (or any user with the cloudsqlsuperuser role) can run the following statements.
-
Create the
atatususer: -
Create the
atatusschema and grant monitoring access in every database you want monitored:To collect data or custom metrics that require querying additional tables, grant the SELECT permission on those tables: GRANT SELECT ON TABLE_NAME TO atatus;. -
Create the explain function in every database:
Verify
Confirm theatatus user can connect and read the core tables:
Configure Atatus Infrastructure Agent
- Install the Atatus Infrastructure agent on a host that can reach your Cloud SQL instance.
-
Copy the PostgreSQL example configuration file:
-
Update the PostgreSQL configuration file at
/etc/atatus-infra-agent/conf.d/postgresql.d/postgresql.yml:Replace<INSTANCE_IP>with your Cloud SQL instance’s private/public IP, or127.0.0.1if connecting through the Cloud SQL Auth Proxy. -
Restart the Atatus Infra Agent: