Skip to main content
Version: 0.4 · current

Availability group checks

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

The sqlserver_ag module runs these checks against each availability group, through its listener when one is known. The rule, interval and default severity below are generated from the product's check catalog at build time, so they always match the version you are reading. Thresholds are defaults; your entities and resources may override them.

CheckEveryDefault severityRule
sqlserver_ag.replica_state
Replica role and synchronization state
30scriticalsynchronization_health_desc = HEALTHY, connected_state_desc = CONNECTED
sqlserver_ag.database_sync
Database synchronization, queues and data loss
30swarningwarning > 51200 kilobytes · 5m / critical > 512000 kilobytes · 5m
sqlserver_ag.secondary_lag
Secondary lag (estimated data loss)
30swarningwarning > 60 seconds / critical > 300 seconds
sqlserver_ag.role_change
Role change / failover detected
30scriticalany change
sqlserver_ag.listener_dns
Listener IP online
60scriticalstate_desc = ONLINE
sqlserver_ag.backup_preference
Backup preference honoured
3600swarningmatches_preference = 1

Checks​

sqlserver_ag.replica_state

Replica role and synchronization state

Measures
replica_state · every 30s · tsql
Rule
synchronization_health_desc = HEALTHY, connected_state_desc = CONNECTED · Default severity: critical
Cause
A replica lost its connection to the primary, or its synchronization health is partially healthy or not healthy.
Impact
A replica that is not healthy cannot take over without data loss; a disconnected one cannot take over at all.
Action
Check the replica's SQL Server error log and the cluster's health; look for network, endpoint or service account problems between the replicas.
Baseline
PARTIALLY_HEALTHY → warning; NOT_HEALTHY or DISCONNECTED → critical. · source

sqlserver_ag.database_sync

Database synchronization, queues and data loss

Measures
redo_queue_kb (kilobytes) · every 30s · tsql
Rule
warning > 51200 kilobytes · 5m / critical > 512000 kilobytes · 5m · Default severity: warning
Cause
The secondary receives or applies log more slowly than the primary produces it: a busy primary, a slow network or slow disks on the secondary.
Impact
The send queue is data a failover would lose; the redo queue is time a failover would take to recover.
Action
Compare log send rate and redo rate with the primary's log generation; check the secondary's disk latency and the network between replicas.
Baseline
Redo queue above 50 MB sustained indicates the secondary cannot keep up; 500 MB is critical. Send queue uses 10 MB / 100 MB.

sqlserver_ag.secondary_lag

Secondary lag (estimated data loss)

Measures
secondary_lag_seconds (seconds) · every 30s · tsql
Rule
warning > 60 seconds / critical > 300 seconds · Default severity: warning
Cause
The secondary is behind the primary by more seconds than your RPO allows.
Impact
If the primary failed now, you would lose about this many seconds of committed transactions.
Action
Compare with the entity's RPO. Synchronous replicas should stay near zero; for asynchronous replicas, investigate log send and redo rates.
Baseline
Compare with the entity RPO; synchronous replicas should stay near 0.

sqlserver_ag.role_change

Role change / failover detected

Measures
role · every 30s · tsql
Rule
any change · Default severity: critical
Cause
The primary moved to another replica: a planned failover, an automatic failover or a forced one.
Impact
Applications reconnect; connections that do not use the listener may break.
Action
Confirm whether the failover was planned; check cluster and SQL error logs on both nodes; verify listener DNS.
Baseline
Any role change raises an event that stays open until someone resolves it; critical when it happened outside a maintenance window.

sqlserver_ag.listener_dns

Listener IP online

Measures
listener_state · every 60s · tsql
Rule
state_desc = ONLINE · Default severity: critical
Cause
No listener IP is online, or Excubius cannot reach the IP of the primary's subnet.
Impact
Applications that connect through the listener cannot reach the group.
Action
Check the listener resource in the cluster; in multi-subnet groups, allow the Excubius server to reach every listener IP.
Baseline
One listener IP must be ONLINE on the primary; synthetics.ag_listener_resolve also resolves the DNS name from the collector.

sqlserver_ag.backup_preference

Backup preference honoured

Measures
backup_preference · every 3600s · tsql
Rule
matches_preference = 1 · Default severity: warning
Cause
The primary took full backups of the group's databases in the last 26 hours although it is not their preferred backup replica.
Impact
Backup jobs that respect the preference may silently skip, or backups load the primary.
Action
Run full backups on the replica the group's automated backup preference names, or change the preference.
Baseline
Backups should run where the AG preference says, otherwise jobs silently skip.