Availability Group Online (rollup)

Microsoft.SQLServer.2017.AlwaysOn.Library.Rollup.AvailabilityGroup.AvailabilityGroupOnline (AggregateMonitor)

This monitor checks the online or offline state of availability group. The monitor is in unhealthy state and alert is raised when the availability group’s cluster resource is offline or the availability group does not have a primary replica. The monitor state is healthy when the cluster resource of availability group is online and the availability group has a primary replica. This monitor is an aggregate (rollup) monitor.

Knowledge Base article:

Summary

This monitor checks the online or offline state of availability group. The monitor is unhealthy and alert is raised when the availability group’s cluster resource is offline or the availability group does not have a primary replica. The monitor state is healthy when the cluster resource of availability group is online and the availability group has a primary replica.

Causes

The availability group is offline, and is unavailable. This issue can be caused by a failure in the server instance that hosts the primary replica or by the WSFC availability group resource going offline.

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.2017.AlwaysOn.Library.AvailabilityGroup
Parent MonitorSystem.Health.AvailabilityState
AlgorithmWorstOf
CategoryAvailabilityHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
RemotableTrue
AccessibilityPublic
Alert Message
MSSQL 2017: Availability Group is offline
Availability Group {0} is offline and it is not available

Source Code:

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