Atatus Database Monitoring offers comprehensive monitoring for your Google Cloud AlloyDB for PostgreSQL clusters, providing valuable insights into query performance, query samples, execution plans, connection details, and system statistics. The Atatus Infra Agent runs on a separate host (typically a GCE VM in the same VPC) and connects to your AlloyDB primary instance over private IP or the AlloyDB Auth Proxy.

Before You Begin

Configure AlloyDB Instance Flags

In the Google Cloud Console, open your AlloyDB instance and edit its Database flags, then restart the instance.

Setup Database Access for the Agent

Connect to the primary instance as a superuser:
  1. Create the atatus user and grant monitoring access. Run these commands in every database on the instance:
    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;.
  2. Create the explain function in every database:

Verify

Confirm the atatus user can connect and read the core tables:

Configure Atatus Infrastructure Agent

  1. Install the Atatus Infrastructure agent on a host that can reach your AlloyDB primary instance.
  2. Copy the PostgreSQL example configuration file:
  3. Update the PostgreSQL configuration file at /etc/atatus-infra-agent/conf.d/postgresql.d/postgresql.yml:
    Replace <INSTANCE_ADDRESS> with your AlloyDB primary instance’s private IP. For accurate metrics, connect directly to the primary and avoid load balancers and connection poolers.
  4. Restart the Atatus Infra Agent:

Connecting via AlloyDB Auth Proxy (Optional)

When connecting through the AlloyDB Auth Proxy, override the reported hostname so metrics are tagged to the AlloyDB instance:

Collecting Schemas (Optional)

Collecting Custom Metrics (Optional)