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.
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:
Analyze the consolidated workload of the cluster
Apply role-based access control (RBAC) at the cluster level
Filter dashboards and reports by cluster or application
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
Where to go next
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