Ping 状态

Microsoft.SystemCenter.Ping (UnitMonitor)

此监视器使用 ICMP Ping 对无代理计算机执行 Ping 操作。如果计算机是代理托管计算机,则在本地对其自身执行 Ping 操作。

Knowledge Base article:

摘要

此监视器定期对目标计算机进行 Ping 操作,并根据是否收到响应来更改状态。默认情况下,只为无代理托管计算机启用了此监视器。如果为代理托管计算机启用此监视器,则该代理将对其自身进行 Ping 操作。此监视器依赖于 Win32_PingStatus 方法 WMI 对其自身进行 Ping 操作,因而只能在 Windows XP 及更高版本或 Windows Server 2003 及更高版本上工作。

原因

1. 运行 Windows Vista 或 Windows Server 2008 的计算机的默认防火墙设置将阻止计算机提供 Ping 响应。此原因同样适用于代理托管系统和无代理托管系统。

2. 如果计算机为无代理托管计算机,则它可能不再通过 ICMP Ping 进行响应。这可能是由以下原因引起的:

3. 如果计算机是代理托管的,则这可能表示本地网络适配器存在问题。

4. WMI 也可能存在问题。

解决方法

对于运行 Windows Vista 或 Windows Server 2008 的计算机,请将防火墙配置为允许传入 ICMP 流量。有关说明,请参阅“Create an Inbound ICMP Rule on Windows Vista or Windows Server 2008”(在 Windows Vista 或 Windows Server 2008 上创建入站 ICMP 规则)( http://go.microsoft.com/fwlink/?LinkId=161045)。

检查远程计算机是否已插入网络以及远程计算机是否有 IP 地址。本地登录到该计算机,然后在命令行处键入以下命令:

ipconfig

如果计算机没有 IP 地址或者 IP 地址为 0.0.0.0,请执行以下步骤修复本地计算机上的网络连接:

如果是分类视图,“网络连接”可以在“网络和 Internet 连接”类别中找到。

Element properties:

TargetMicrosoft.Windows.Computer
Parent MonitorSystem.Health.AvailabilityState
CategoryStateCollection
EnabledFalse
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SystemCenter.PingMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
Ping 计算机失败
{0}
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SystemCenter.Ping" Accessibility="Public" Enabled="false" Target="Windows!Microsoft.Windows.Computer" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="SCLibrary!Microsoft.SystemCenter.PingMonitorType" ConfirmDelivery="false">
<Category>StateCollection</Category>
<AlertSettings AlertMessage="Microsoft.SystemCenter.Ping.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</AlertParameter1>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Reachable" MonitorTypeStateID="Reachable" HealthState="Success"/>
<OperationalState ID="SlowResponseTime" MonitorTypeStateID="SlowResponseTime" HealthState="Warning"/>
<OperationalState ID="Unreachable" MonitorTypeStateID="Unreachable" HealthState="Error"/>
</OperationalStates>
<Configuration>
<Computer>$Target/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Computer>
<ResponseTimeThreshold>5000</ResponseTimeThreshold>
<Frequency>300</Frequency>
</Configuration>
</UnitMonitor>