Monitor High-Availability Clusters

Datasentinel supports monitoring high-availability (HA) PostgreSQL clusters, allowing activity analysis across primary and replica instances from a single, consolidated view.

This guide explains how Datasentinel detects and manages HA clusters, how instances are grouped, and how to analyze workload and activity in highly available PostgreSQL environments.

HA Cluster Detection

Datasentinel automatically detects the role of each PostgreSQL instance, identifying primary instances and read-only replicas based on runtime characteristics.

circle-info

If a failover occurs, Datasentinel updates instance roles automatically to reflect the new cluster topology.

Using Tags with HA Clusters

Tags can be applied to PostgreSQL instances that belong to an HA cluster.

When instances share the same tag (for example, ha_cluster=sales-app), you can:

Tags combined with HA awareness provide powerful grouping and access-control capabilities.

Consolidated Cluster View

Datasentinel provides a cluster-level view that aggregates activity across all instances in the HA cluster.

This allows you to:

  • Analyze total workload across the cluster

  • Compare activity between primary and replicas

  • Identify load distribution and imbalance

Cluster-level analysis removes the need to inspect each instance individually.

Workload Analysis Across HA Clusters

Using Datasentinel dashboards and analysis modules, you can:

  • View Top Queries across the entire cluster

  • Analyze Session Activity on primary and replicas

  • Identify queries executed on replicas only

  • Detect replication-aware workload patterns

This is particularly useful for understanding how applications leverage read replicas.

Viewing Replication Statistics

Datasentinel collects and logs replication statistics for PostgreSQL read replicas, providing clear visibility into replication health.

For each replica, Datasentinel allows you to:

  • View the WAL delta size, representing the amount of data remaining to be replicated

  • Monitor replication delay, indicating how far replicas lag behind the primary instance

Common Use Cases

Typical HA cluster monitoring scenarios include:

  • Analyzing total workload across primary and replicas

  • Verifying that read traffic is correctly routed to replicas

  • Comparing query patterns between instances

  • Monitoring cluster behavior during failover events

Best Practices

  • Use consistent tags across all instances in an HA cluster

  • Combine cluster-level analysis with instance-level dashboards

  • Review workload distribution regularly

  • Use tags to control access to entire clusters via RBAC

circle-info

Datasentinel is compatible with read replicas from managed PostgreSQL services offered by major public cloud providers, including Amazon RDS, Microsoft Azure, and Google Cloud.

Conclusion

Datasentinel provides clear visibility into high-availability PostgreSQL environments by automatically detecting primary and replica roles and enabling consolidated activity analysis across instances.

Last updated