NLB 节点取决于负载平衡应用程序

Microsoft.Windows.NetworkLoadBalancing.ServerRoleDependsOnAnotherServerRole (DependencyMonitor)

Knowledge Base article:

摘要

这是汇总负载平衡应用程序状态的依赖关系汇总监视器,由相应的管理包报告。在 NLB 节点与负载平衡应用程序之间的关系被发现之前,此监视器的状态将被设置为未监视。

此监视器有两个与其相关联的恢复,这两个恢复在默认情况下被禁用,您需要创建替代来启用恢复。第一个恢复配置为在监视器状态更改为错误时执行。当发生此情况时,恢复将把 NLB 节点移出 NLB 群集。第二个恢复配置为在监视器状态更改为成功时执行。当发生此情况时,恢复将把 NLB 节点重新添加到 NLB 群集中。

原因

如果负载平衡应用程序处于错误状态,此监视器将进入错误状态。

解决方案

使用运行状况资源管理器来确定负载平衡应用程序处于错误或警告状态的根本原因。建议您在对负载平衡应用程序进行故障排除时将此节点移出 NLB 群集。这样将确保只有运行状况正常的节点才能接收请求。您可以使用停止 NLB 节点任务将 NLB 节点移出群集。

停止 NLB 节点

Element properties:

TargetMicrosoft.Windows.NetworkLoadBalancing.ServerRole
Parent MonitorSystem.Health.AvailabilityState
AlgorithmWorstOf
Source MonitorSystem.Health.AvailabilityState
RelationshipMicrosoft.Windows.NetworkLoadBalancing.ServerRoleContainsDependantServerRole
CategoryCustom
EnabledTrue
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
RemotableTrue
AccessibilityPublic
Alert Message
负载平衡应用程序不正常
{0} 上运行的负载平衡应用程序不正常。NLB 节点是带有 IP {1} 的群集的一部分。

Source Code:

<DependencyMonitor ID="Microsoft.Windows.NetworkLoadBalancing.ServerRoleDependsOnAnotherServerRole" Accessibility="Public" Enabled="true" Target="Microsoft.Windows.NetworkLoadBalancing.ServerRole" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" RelationshipType="Microsoft.Windows.NetworkLoadBalancing.ServerRoleContainsDependantServerRole" MemberMonitor="Health!System.Health.AvailabilityState">
<Category>Custom</Category>
<AlertSettings AlertMessage="Microsoft.Windows.NetworkLoadBalancing.ServerRoleDependsOnAnotherServerRole_AlertMessageResourceID">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</AlertParameter1>
<AlertParameter2>$Target/Property[Type="Microsoft.Windows.NetworkLoadBalancing.ServerRole"]/ClusterIP$</AlertParameter2>
</AlertParameters>
</AlertSettings>
<Algorithm>WorstOf</Algorithm>
<MemberUnAvailable>Error</MemberUnAvailable>
</DependencyMonitor>