Ping Monitor

Microsoft.SystemCenter.Essentials.Internal.PingCheck.Template (Template)

This template allows you to monitor a network device using ICMP ping.

Source Code:

<Template ID="Microsoft.SystemCenter.Essentials.Internal.PingCheck.Template">
<Configuration>
<IncludeSchemaTypes>
<SchemaType>SC!Microsoft.SystemCenter.GroupPopulationSchema</SchemaType>
</IncludeSchemaTypes>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="TypeId" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Name" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Description" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="LocaleId" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ServerName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ResponseTimeThreshold" type="xsd:unsignedInt"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="PollIntervalInSeconds" type="xsd:unsignedInt"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="IncludeList" type="MonitoringObjectIdListType"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="WatcherComputersList" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="UniquenessKey" type="xsd:string"/>
</Configuration>
<References>
<Reference ID="System"/>
<Reference ID="SC"/>
<Reference ID="Windows"/>
<Reference ID="Self"/>
<Reference ID="Health"/>
</References>
<Implementation>
<TypeDefinitions>
<EntityTypes>
<ClassTypes>
<ClassType ID="$TemplateConfig/TypeId$" Base="$Reference/Self$Microsoft.SystemCenter.Essentials.Internal.PingCheckPerspective" Abstract="false" Accessibility="Public" Hosted="true"/>
<ClassType ID="$TemplateConfig/TypeId$Group" Base="$Reference/Self$Microsoft.SystemCenter.Essentials.Internal.PingCheckPerspectiveGroup" Abstract="false" Accessibility="Public" Singleton="true" Hosted="false"/>
<ClassType ID="$TemplateConfig/TypeId$WatcherComputersGroup" Abstract="false" Accessibility="Public" Base="$Reference/SC$Microsoft.SystemCenter.ComputerGroup" Hosted="false" Singleton="true"/>
</ClassTypes>
<RelationshipTypes>
<RelationshipType ID="$TemplateConfig/TypeId$Group.Contains.$TemplateConfig/TypeId$" Accessibility="Public" Base="$Reference/System$System.Containment">
<Source>$TemplateConfig/TypeId$Group</Source>
<Target>$TemplateConfig/TypeId$</Target>
</RelationshipType>
</RelationshipTypes>
</EntityTypes>
<ModuleTypes>
<DataSourceModuleType ID="$TemplateConfig/TypeId$.PingCheckDataSource" Accessibility="Public">
<Configuration/>
<ModuleImplementation>
<Composite>
<MemberModules>
<DataSource ID="Scheduler" TypeID="System!System.Scheduler">
<Scheduler>
<SimpleReccuringSchedule>
<Interval Unit="Seconds">$TemplateConfig/PollIntervalInSeconds$</Interval>
</SimpleReccuringSchedule>
<ExcludeDates/>
</Scheduler>
</DataSource>
<ProbeAction ID="PingProbe" TypeID="$Reference/Self$Microsoft.SystemCenter.Essentials.Internal.PingTemplateProbe">
<ComputerName>$TemplateConfig/ServerName$</ComputerName>
</ProbeAction>
</MemberModules>
<Composition>
<Node ID="PingProbe">
<Node ID="Scheduler"/>
</Node>
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>$Reference/System$System.PropertyBagData</OutputType>
</DataSourceModuleType>
</ModuleTypes>
<MonitorTypes>
<UnitMonitorType ID="$TemplateConfig/TypeId$.PingMonitorType" Accessibility="Public">
<MonitorTypeStates>
<MonitorTypeState ID="Reachable" NoDetection="false"/>
<MonitorTypeState ID="SlowResponseTime" NoDetection="false"/>
<MonitorTypeState ID="Unreachable" NoDetection="false"/>
</MonitorTypeStates>
<Configuration/>
<MonitorImplementation>
<MemberModules>
<DataSource TypeID="$TemplateConfig/TypeId$.PingCheckDataSource" ID="DS1"/>
<ConditionDetection ID="ErrorFilter" TypeID="System!System.ExpressionFilter">
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>Property[@Name='StatusCode']</XPathQuery>
</ValueExpression>
<Operator>NotEqual</Operator>
<ValueExpression>
<Value Type="Integer">0</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</ConditionDetection>
<ConditionDetection ID="WarningFilter" TypeID="System!System.ExpressionFilter">
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>Property[@Name='StatusCode']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="Integer">0</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>Property[@Name='ResponseTime']</XPathQuery>
</ValueExpression>
<Operator>GreaterEqual</Operator>
<ValueExpression>
<Value Type="Integer">$TemplateConfig/ResponseTimeThreshold$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</ConditionDetection>
<ConditionDetection ID="SuccessFilter" TypeID="System!System.ExpressionFilter">
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>Property[@Name='StatusCode']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="Integer">0</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</ConditionDetection>
</MemberModules>
<RegularDetections>
<RegularDetection MonitorTypeStateID="Unreachable">
<Node ID="ErrorFilter">
<Node ID="DS1"/>
</Node>
</RegularDetection>
<RegularDetection MonitorTypeStateID="SlowResponseTime">
<Node ID="WarningFilter">
<Node ID="DS1"/>
</Node>
</RegularDetection>
<RegularDetection MonitorTypeStateID="Reachable">
<Node ID="SuccessFilter">
<Node ID="DS1"/>
</Node>
</RegularDetection>
</RegularDetections>
</MonitorImplementation>
</UnitMonitorType>
</MonitorTypes>
</TypeDefinitions>
<Monitoring>
<Discoveries>
<Discovery ID="$TemplateConfig/TypeId$.Discovery.Rule" Enabled="false" Target="$Reference/Windows$Microsoft.Windows.Computer">
<Category>Discovery</Category>
<DiscoveryTypes>
<DiscoveryClass TypeID="$TemplateConfig/TypeId$"/>
<DiscoveryRelationship TypeID="$Reference/Self$Microsoft.SystemCenter.Essentials.Internal.ComputerHostsPingCheckPerspective"/>
</DiscoveryTypes>
<DataSource ID="PerspectiveDiscoveryDS" TypeID="$Reference/Self$Microsoft.SystemCenter.Essentials.Internal.PerspectiveDiscoveryDataSource">
<ClassId>$MPElement[Name="$TemplateConfig/TypeId$"]$</ClassId>
<DisplayName>$TemplateConfig/Name$</DisplayName>
<WatcherComputersList>$TemplateConfig/WatcherComputersList$</WatcherComputersList>
<UniquenessKey>$TemplateConfig/UniquenessKey$</UniquenessKey>
</DataSource>
</Discovery>
<Discovery ID="$TemplateConfig/TypeId$Group.Discovery.Rule" Enabled="true" Target="$TemplateConfig/TypeId$Group">
<Category>Discovery</Category>
<DiscoveryTypes>
<DiscoveryClass TypeID="$TemplateConfig/TypeId$Group"/>
</DiscoveryTypes>
<DataSource ID="GroupDiscoveryDS" TypeID="$Reference/SC$Microsoft.SystemCenter.GroupPopulator">
<RuleId>$MPElement$</RuleId>
<GroupInstanceId>$Target/Id$</GroupInstanceId>
<MembershipRules>
<MembershipRule>
<MonitoringClass>$MPElement[Name="$TemplateConfig/TypeId$"]$</MonitoringClass>
<RelationshipClass>$MPElement[Name="$TemplateConfig/TypeId$Group.Contains.$TemplateConfig/TypeId$"]$</RelationshipClass>
</MembershipRule>
</MembershipRules>
</DataSource>
</Discovery>
<Discovery ID="$TemplateConfig/TypeId$WatcherComputersGroup.Discovery.Rule" Target="$TemplateConfig/TypeId$WatcherComputersGroup" Enabled="true">
<Category>Discovery</Category>
<DiscoveryTypes>
<DiscoveryClass TypeID="$TemplateConfig/TypeId$WatcherComputersGroup"/>
</DiscoveryTypes>
<DataSource ID="GroupPopulationDataSource" TypeID="$Reference/SC$Microsoft.SystemCenter.GroupPopulator">
<RuleId>$MPElement$</RuleId>
<GroupInstanceId>$Target/Id$</GroupInstanceId>
<MembershipRules>
<MembershipRule>
<MonitoringClass>$MPElement[Name="$Reference/Windows$Microsoft.Windows.Computer"]$</MonitoringClass>
<RelationshipClass>$MPElement[Name="$Reference/SC$Microsoft.SystemCenter.ComputerGroupContainsComputer"]$</RelationshipClass>
<IncludeList>$TemplateConfig/IncludeList$</IncludeList>
</MembershipRule>
<MembershipRule>
<MonitoringClass>$MPElement[Name="$Reference/Windows$Microsoft.Windows.Computer"]$</MonitoringClass>
<RelationshipClass>$MPElement[Name="$Reference/SC$Microsoft.SystemCenter.ComputerGroupContainsComputer"]$</RelationshipClass>
<Expression>
<Contains maxDepth="1">
<MonitoringClass>$MPElement[Name="$TemplateConfig/TypeId$"]$</MonitoringClass>
</Contains>
</Expression>
</MembershipRule>
</MembershipRules>
</DataSource>
</Discovery>
</Discoveries>
<Rules/>
<Monitors>
<UnitMonitor ID="$TemplateConfig/TypeId$.PingMonitor" TypeID="$TemplateConfig/TypeId$.PingMonitorType" Target="$TemplateConfig/TypeId$" ParentMonitorID="$Reference/Health$System.Health.AvailabilityState" Enabled="true" Accessibility="Public">
<Category>StateCollection</Category>
<AlertSettings AlertMessage="$TemplateConfig/TypeId$.PingMonitor.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertParameters>
<AlertParameter1>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</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/>
</UnitMonitor>
<DependencyMonitor ID="$TemplateConfig/TypeId$.GroupHealth" Accessibility="Public" Target="$TemplateConfig/TypeId$Group" Enabled="true" ParentMonitorID="$Reference/Health$System.Health.AvailabilityState" RelationshipType="$TemplateConfig/TypeId$Group.Contains.$TemplateConfig/TypeId$" MemberMonitor="$Reference/Health$System.Health.AvailabilityState">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="$TemplateConfig/TypeId$.GroupHealth.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
</AlertSettings>
<Algorithm>WorstOf</Algorithm>
<MemberInMaintenance>Success</MemberInMaintenance>
<MemberUnAvailable>Error</MemberUnAvailable>
</DependencyMonitor>
</Monitors>
<Overrides>
<DiscoveryPropertyOverride ID="$TemplateConfig/TypeId$.Discovery.Rule.Override" Discovery="$TemplateConfig/TypeId$.Discovery.Rule" Context="$TemplateConfig/TypeId$WatcherComputersGroup" Enforced="false" Property="Enabled">
<Value>true</Value>
</DiscoveryPropertyOverride>
</Overrides>
</Monitoring>
<Presentation>
<StringResources>
<StringResource ID="$TemplateConfig/TypeId$.GroupHealth.AlertMessage"/>
<StringResource ID="$TemplateConfig/TypeId$.PingMonitor.AlertMessage"/>
</StringResources>
</Presentation>
<LanguagePacks>
<LanguagePack ID="$TemplateConfig/LocaleId$">
<DisplayStrings>
<DisplayString ElementID="$TemplateConfig/TypeId$">
<Name>$TemplateConfig/Name$</Name>
<Description>$TemplateConfig/Description$</Description>
</DisplayString>
<DisplayString ElementID="$TemplateConfig/TypeId$.Discovery.Rule">
<Name>$TemplateConfig/Name$ Discovery</Name>
<Description>Discovery rule for $TemplateConfig/Name$</Description>
</DisplayString>
<DisplayString ElementID="$TemplateConfig/TypeId$Group.Discovery.Rule">
<Name>$TemplateConfig/Name$ Group Discovery</Name>
<Description>Discovery for group of $TemplateConfig/Name$</Description>
</DisplayString>
<DisplayString ElementID="$TemplateConfig/TypeId$WatcherComputersGroup.Discovery.Rule">
<Name>$TemplateConfig/Name$ Watcher Group Discovery</Name>
<Description>Discovery for $TemplateConfig/Name$ watcher computers</Description>
</DisplayString>
<DisplayString ElementID="$TemplateConfig/TypeId$Group.Contains.$TemplateConfig/TypeId$">
<Name>Group of $TemplateConfig/Name$</Name>
<Description>Group of $TemplateConfig/Name$</Description>
</DisplayString>
<DisplayString ElementID="$TemplateConfig/TypeId$WatcherComputersGroup">
<Name>$TemplateConfig/Name$ watcher computers group</Name>
<Description>Group of $TemplateConfig/Name$ watcher computers</Description>
</DisplayString>
<DisplayString ElementID="$TemplateConfig/TypeId$.PingMonitor">
<Name>Ping Status</Name>
<Description>Ping status from a watcher node.</Description>
</DisplayString>
<DisplayString ElementID="$TemplateConfig/TypeId$.PingMonitor" SubElementID="Reachable">
<Name>Target Reachable</Name>
</DisplayString>
<DisplayString ElementID="$TemplateConfig/TypeId$.PingMonitor" SubElementID="SlowResponseTime">
<Name>Slow Response Time</Name>
</DisplayString>
<DisplayString ElementID="$TemplateConfig/TypeId$.PingMonitor" SubElementID="Unreachable">
<Name>Target Unreachable</Name>
</DisplayString>
<DisplayString ElementID="$TemplateConfig/TypeId$.PingMonitor.AlertMessage">
<Name>Failed to Ping Computer</Name>
<Description>Watcher node {0} was unable to ping target $TemplateConfig/ServerName$.</Description>
</DisplayString>
<DisplayString ElementID="$TemplateConfig/TypeId$.GroupHealth">
<Name>$TemplateConfig/Name$ Group Roll-up Monitor</Name>
<Description>Ping check Dependency Monitor that rolls up health for all Watcher Nodes Monitoring $TemplateConfig/Name$. This monitors $TemplateConfig/ServerName$.</Description>
</DisplayString>
<DisplayString ElementID="$TemplateConfig/TypeId$.GroupHealth.AlertMessage">
<Name>$TemplateConfig/Name$ Group Roll-up Monitor</Name>
<Description>Ping check Dependency Monitor that rolls up health for all Watcher Nodes Monitoring $TemplateConfig/Name$. This monitors $TemplateConfig/ServerName$.</Description>
</DisplayString>
<DisplayString ElementID="$TemplateConfig/TypeId$Group">
<Name>$TemplateConfig/Name$ Ping check Group</Name>
<Description>Ping check Group that rolls up health of all watcher nodes monitoring $TemplateConfig/Name$.</Description>
</DisplayString>
<DisplayString ElementID="$TemplateConfig/TypeId$.PingMonitorType">
<Name>Ping Monitor Type</Name>
<Description>Ping Monitor Type.</Description>
</DisplayString>
<DisplayString ElementID="$TemplateConfig/TypeId$.PingMonitorType" SubElementID="Reachable">
<Name>Success</Name>
</DisplayString>
<DisplayString ElementID="$TemplateConfig/TypeId$.PingMonitorType" SubElementID="SlowResponseTime">
<Name>Warning</Name>
</DisplayString>
<DisplayString ElementID="$TemplateConfig/TypeId$.PingMonitorType" SubElementID="Unreachable">
<Name>Error</Name>
</DisplayString>
</DisplayStrings>
<KnowledgeArticles>
<KnowledgeArticle ElementID="$TemplateConfig/TypeId$.PingMonitor" Visible="true">
<MamlContent>
<maml:section xmlns:maml="http://schemas.microsoft.com/maml/2004/10">
<maml:title>Summary</maml:title>
<maml:para>This monitor pings a remote computer. This monitor runs on each watcher node.</maml:para>
<maml:para>This monitor uses the Win32_PingStatus in WMI to remotely and locally ping machines.</maml:para>
<maml:para>This monitor only works on Windows XP and higher or Windows Server 2003 and higher.</maml:para>
<maml:para/>
</maml:section>
<maml:section xmlns:maml="http://schemas.microsoft.com/maml/2004/10">
<maml:title>Causes</maml:title>
<maml:para>1. If this monitor indicates that the computer can no longer be contacted via ICMP Ping. This can happen for the following reasons:</maml:para>
<maml:list class="unordered">
<maml:listItem>
<maml:para>The computer has been rebooted or shut down</maml:para>
</maml:listItem>
<maml:listItem>
<maml:para>The computer network adapter is no plugged into the network</maml:para>
</maml:listItem>
<maml:listItem>
<maml:para>The firewall was enabled and does not allow ping.</maml:para>
</maml:listItem>
<maml:listItem>
<maml:para>There could be a problem with WMI.</maml:para>
</maml:listItem>
</maml:list>
<maml:para/>
</maml:section>
<maml:section xmlns:maml="http://schemas.microsoft.com/maml/2004/10">
<maml:title>Resolutions</maml:title>
<maml:para>Check if the remote machine is plugged into the network and that it has an IP address. Locally log into the machine, and type the following at the command line:</maml:para>
<maml:para>ipconfig</maml:para>
<maml:para>If the computer doesn't have an IP address or the IP address is 0.0.0.0, repair the network connection on the local machine by following the steps below:</maml:para>
<maml:list class="unordered">
<maml:listItem>
<maml:para>Open the Control Panel</maml:para>
</maml:listItem>
<maml:listItem>
<maml:para>Open Network Connections</maml:para>
</maml:listItem>
</maml:list>
<maml:para>If the category view, Network Connections can be found in the Network and Internet Connections category.</maml:para>
<maml:list class="unordered">
<maml:listItem>
<maml:para>Right click on the network connection that cannot be pinged, and choose Repair</maml:para>
</maml:listItem>
<maml:listItem>
<maml:para>Check again that the computer has a valid IP address by typing ipconfig from the command line.</maml:para>
</maml:listItem>
<maml:listItem>
<maml:para>If this does not work, disable the network connection and then enable it.</maml:para>
</maml:listItem>
</maml:list>
<maml:para/>
</maml:section>
</MamlContent>
</KnowledgeArticle>
</KnowledgeArticles>
</LanguagePack>
</LanguagePacks>
</Implementation>
</Template>