可用性複本角色 (彙總)

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

此監視器會彙總所有可用性複本的角色狀態,並會查看是否有任何可用性複本的角色狀況不良。若有任何可用性複本既不是主要複本也不是次要複本,表示監視器狀況不良,反之則表示狀況良好。此監視器是彙總監視器。

Knowledge Base article:

摘要

此監視器會彙總所有可用性複本的角色狀態,並會檢查看有無任何可用性複本不是狀況良好的角色。當有任何可用性複本不是主要複本也不是次要複本時,監視器就會呈現狀況不良的狀態,否則監視器會呈現狀況良好的狀態。

原因

在此可用性群組中,至少有一個可用性複本目前沒有主要或次要角色。

解決方式

使用可用性複本監視器狀態,尋找角色不是主要或次要的可用性複本,並解決可用性複本的問題。

可覆寫的參數

名稱

描述

預設值

已啟用

啟用或停用該工作流程。

產生警示

定義工作流程是否要產生警示。

Element properties:

TargetMicrosoft.SQLServer.Core.AvailabilityGroup
Parent MonitorSystem.Health.AvailabilityState
AlgorithmWorstOf
CategoryAvailabilityHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
Alert Auto ResolveTrue
RemotableTrue
AccessibilityPublic
Alert MessageMicrosoft.SQLServer.Core.Rollup.AvailabilityGroup.AvailabilityReplicaRoleState.AlertMessage

Source Code:

<AggregateMonitor ID="Microsoft.SQLServer.Core.Rollup.AvailabilityGroup.AvailabilityReplicaRoleState" 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.AvailabilityReplicaRoleState.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Warning</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>