Availability Group Automatic Failover (rollup)

Microsoft.SQLServer.Core.Rollup.AvailabilityGroup.AutomaticFailoverReadiness (AggregateMonitor)

This monitor checks if the availability group has at least one secondary replica which is failover ready. The monitor becomes unhealthy and alert is registered when the failover mode of primary replica is automatic but none of secondary replica in the availability group is automatic failover ready. The monitor is healthy when at least one secondary replica is automatic failover ready. This monitor is an aggregate (rollup) monitor.

Knowledge Base article:

Summary

This monitor checks whether the Availability Group has at least one secondary replica which is failover ready. The monitor becomes unhealthy and alert is registered when the failover mode of primary replica is automatic but none of secondary replica in the Availability Group is automatic failover ready. The monitor is healthy when at least one secondary replica is automatic failover ready.

Causes

The Availability Group is not ready for automatic failover. The primary replica is configured for automatic failover; however, the secondary replica is not ready for automatic failover. The secondary replica that is configured for automatic failover might be unavailable or its data synchronization state is currently not SYNCHRONIZED.

Resolutions

Overridable Parameters

Name

Description

Default Value

Alert Priority

Defines Alert Priority.

Normal

Alert Severity

Defines Alert Severity.

Error

Enabled

Enables or disables the workflow.

Yes

Generates Alerts

Defines whether the workflow generates an Alert.

Yes

Element properties:

TargetMicrosoft.SQLServer.Core.AvailabilityGroup
Parent MonitorSystem.Health.AvailabilityState
AlgorithmWorstOf
CategoryAvailabilityHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
RemotableTrue
AccessibilityPublic
Alert Message
MSSQL: Availability Group is not ready for automatic failover
The Availability Group {0} is not ready for automatic failover while it was configured to failover automatically.
Cluster Name: {1}
Primary Replica: {2}

Source Code:

<AggregateMonitor ID="Microsoft.SQLServer.Core.Rollup.AvailabilityGroup.AutomaticFailoverReadiness" Accessibility="Public" Enabled="true" Target="Microsoft.SQLServer.Core.AvailabilityGroup" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.Core.Rollup.AvailabilityGroup.AutomaticFailoverReadiness.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="System!System.Entity"]/DisplayName$</AlertParameter1>
<AlertParameter2>$Target/Property[Type="Microsoft.SQLServer.Core.AvailabilityGroup"]/ClusterName$</AlertParameter2>
<AlertParameter3>$Target/Property[Type="Microsoft.SQLServer.Core.AvailabilityGroup"]/PrimaryReplicaServerName$</AlertParameter3>
</AlertParameters>
</AlertSettings>
<Algorithm>WorstOf</Algorithm>
</AggregateMonitor>