Skip to main content
Version: 0.4 · current

PostgreSQL

OverviewReviewed October 11, 2026
Applies to:Excubius 0.4Roles: Entity admin, Editor
PlansFree · Pro · EnterpriseDeploymentSelf-hosted

The PostgreSQL module covers PostgreSQL servers, self-hosted or Azure Database for PostgreSQL flexible servers, through a read-only monitoring role: connections, replication lag, transaction ID wraparound, table bloat, the slowest statements and the security posture.

info

Native collection from PostgreSQL is not available in this release. The module's checks are added to a PostgreSQL server resource, but they stay Unknown until a release brings the PostgreSQL transport. For Azure flexible servers, the Azure Monitor source already brings CPU, memory and storage.

What it monitors​

AreaChecksWhy it matters
CapacityConnections used against max_connections; estimated dead tuples of the largest tablesRunning out of connections refuses new sessions; bloat wastes disk and slows scans
AvailabilityReplication lag per standby; transaction ID age per databaseLag is data a failover would lose; wraparound forces PostgreSQL to stop writes
PerformanceThe slowest statements from pg_stat_statementsShows which queries cost the most time
SecuritySuperusers that can log in, SSL, pg_hba rules that trust or accept any addressSettings the CIS PostgreSQL Benchmark flags

What works today for Azure flexible servers:

CheckThroughMeasures
azure.pgflex_healthAzure Monitor sourceCPU, memory and storage of the flexible server, with fired Azure Monitor alerts

Every check, with its rule, cause and action, is in the reference for PostgreSQL checks.

Before you begin​

Prepare the role now, so collection starts as soon as it is available:

  • A monitoring role with pg_monitor, the built-in role that reads statistics and settings without access to data:

    CREATE ROLE usr_monitoring WITH LOGIN PASSWORD '<long random password>';
    GRANT pg_monitor TO usr_monitoring;
  • The pg_stat_statements extension in the database the role connects to, for the slowest statements check.

  • Access to pg_hba_file_rules for the pg_hba part of the security posture check. By default only superusers can read that view.

  • Network. The Excubius server reaches the server on TCP 5432.

  • Store the role as a SQL login credential. See Store a credential for the collector.

For flexible servers in Azure, set up the Azure Monitor source with PostgreSQL flexible servers among its resource types.

Add a resource​

Flexible servers come from the Azure Monitor source by themselves. For a self-hosted server, open Resources › Add resource, choose PostgreSQL server (Flexible or self-hosted), enter its host and port, and choose the credential. See Add a resource.

Next steps​