Availability Group Automatic Failover

Microsoft.SQLServer.2012.AlwaysOn.AutomaticFailoverReadinessRollup (DependencyMonitor)

Knowledge Base article:

Summary

This monitor checks whether the availability group has at least one secondary replica which is failover ready. The monitor is in unhealthy state and alert is raised 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 state 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

Overrideable 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.2012.AlwaysOn.AvailabilityGroup
Parent MonitorSystem.Health.AvailabilityState
AlgorithmWorstOf
Source MonitorMicrosoft.SQLServer.2012.AlwaysOn.AutomaticFailoverReadiness
RelationshipMicrosoft.SQLServer.2012.AlwaysOn.AvailabilityGroupReferencesAvailabilityGroupHealth
CategoryAvailabilityHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
RemotableTrue
AccessibilityPublic
Alert Message
Availability Group is not ready for automatic failover

Availability Group {0} is not ready for automatic failover while it is configured to failover automatically.

Cluster Name: {1}

Primary Replica: {2}

Source Code:

<DependencyMonitor ID="Microsoft.SQLServer.2012.AlwaysOn.AutomaticFailoverReadinessRollup" Accessibility="Public" Enabled="true" Target="AlwaysOnDisc!Microsoft.SQLServer.2012.AlwaysOn.AvailabilityGroup" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" RelationshipType="AlwaysOnDisc!Microsoft.SQLServer.2012.AlwaysOn.AvailabilityGroupReferencesAvailabilityGroupHealth" MemberMonitor="Microsoft.SQLServer.2012.AlwaysOn.AutomaticFailoverReadiness">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.2012.AlwaysOn.AutomaticFailoverReadinessAlertMessage">
<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="AlwaysOnDisc!Microsoft.SQLServer.2012.AlwaysOn.AvailabilityGroup"]/ClusterName$</AlertParameter2>
<AlertParameter3>$Target/Property[Type="AlwaysOnDisc!Microsoft.SQLServer.2012.AlwaysOn.AvailabilityGroup"]/PrimaryReplicaServerName$</AlertParameter3>
</AlertParameters>
</AlertSettings>
<Algorithm>WorstOf</Algorithm>
<MemberUnAvailable>Warning</MemberUnAvailable>
</DependencyMonitor>