WSFC Cluster monitor

Microsoft.SQLServer.2012.AlwaysOn.ClusterStateMonitor (UnitMonitor)

Knowledge Base article:

Summary

This monitor checks the state of Windows Server Failover Cluster (WSFC) service. The monitor is unhealthy state and alert is raised when the cluster is offline or in the forced quorum state. All availability groups hosted within this cluster are offline or the disaster recovery action is required. Monitor state is healthy when the cluster state is in the normal quorum.

Causes

The WSFC cluster is offline or the service is started in the force quorum state. This availability group is not available to client applications.

Resolutions

You need to perform the forced quorum or disaster recovery workflow through cluster administrator tool or contact cluster administrator to resolve the cluster issue. For more information, refer to the forced quorum and disaster recovery how to guide in SQL Server 2012 Books Online.

Element properties:

TargetMicrosoft.SQLServer.2012.AlwaysOn.AvailabilityGroupHealth
Parent MonitorSystem.Health.AvailabilityState
CategoryAvailabilityHealth
EnabledTrue
Alert GenerateFalse
Alert Auto ResolveFalse
Monitor TypeMicrosoft.SQLServer.2012.AlwaysOn.SystemPolicyScriptMonitorType
RemotableTrue
AccessibilityPublic
RunAsMicrosoft.SQLServer.2012.AlwaysOn.MonitoringAccount

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2012.AlwaysOn.ClusterStateMonitor" RunAs="Microsoft.SQLServer.2012.AlwaysOn.MonitoringAccount" TypeID="Microsoft.SQLServer.2012.AlwaysOn.SystemPolicyScriptMonitorType" Accessibility="Public" Enabled="true" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Target="AlwaysOnDisc!Microsoft.SQLServer.2012.AlwaysOn.AvailabilityGroupHealth" Priority="Normal">
<Category>AvailabilityHealth</Category>
<OperationalStates>
<OperationalState ID="Success" MonitorTypeStateID="HealthState" HealthState="Success"/>
<OperationalState ID="Critical" MonitorTypeStateID="ErrorState" HealthState="Error"/>
</OperationalStates>
<Configuration>
<Interval>900</Interval>
<TimeoutSeconds>300</TimeoutSeconds>
<PolicyName>$Target/Property[Type="AlwaysOnDisc!Microsoft.SQLServer.2012.AlwaysOn.AvailabilityGroupHealth"]/AvailabilityGroupName$-AlwaysOnAgWSFClusterHealthPolicy</PolicyName>
<InstanceName>$Target/Property[Type="AlwaysOnDisc!Microsoft.SQLServer.2012.AlwaysOn.AvailabilityGroupHealth"]/InstanceName$</InstanceName>
</Configuration>
</UnitMonitor>