Atatus Database Monitoring offers comprehensive monitoring for your Azure Database for PostgreSQL instances, 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 an Azure VM in the same virtual network) and connects to your PostgreSQL endpoint over TLS.

Before You Begin

Configure PostgreSQL Server Parameters

In the Azure Portal, open your PostgreSQL instance and edit its Server parameters.

For Single Server

For Flexible Server

In addition to the parameters above, allow the pg_stat_statements extension: Restart the instance after applying these changes.

Setup Database Access for the Agent

Connect to the postgres database as the admin user:
Create the atatus user:

Postgres ≥ 16

Execute in every database:

Postgres 15

Execute in every database:

Postgres 10 to 14

Execute in every database:

Postgres 9.6

Execute in every database:
Create helper functions so the Agent can read the full contents of pg_stat_activity and pg_stat_statements:

Explain Plan Function (All Versions)

Create the explain function in every database:

Verify

For PostgreSQL ≥ 10:
For PostgreSQL 9.6, replace the last two commands with:

Configure Atatus Infrastructure Agent

  1. Install the Atatus Infrastructure agent on an Azure VM (or other host) that can reach your PostgreSQL endpoint.
  2. Copy the PostgreSQL example configuration file:
  3. Update the PostgreSQL configuration file at /etc/atatus-infra-agent/conf.d/postgresql.d/postgresql.yml:
    Single Server note: Azure Single Server typically requires the username in the form atatus@<servername>. Adjust the username: value accordingly if your instance enforces that format.
  4. Restart the Atatus Infra Agent:

Collecting Schemas (Optional)

Collecting Custom Metrics (Optional)