サービス実行状態

Microsoft.SystemCenter.NTService.ServiceStateMonitor (UnitMonitor)

Windows サービスの現在の状態を監視します。 このモニターからのアラートは、Windows サービスが現在実行されていないことを示します

Knowledge Base article:

概要

このモニターは、一定間隔で WMI を照会し、Windows サービスの状態を確認します。 自動的に起動するように設定されたサービスが動作していない場合は、アラートが発生します。 サービスが手動で起動するように設定されているか、サービスが無効である場合は、サービスが停止してもアラートは発生しません。

原因

サービスは次のようなさまざまな理由で停止することがあります。

解決策

このサービス用に収集されたすべてのイベントを表示するには次のリンクを使用します。

すべてのイベントの表示

Windows サービスの再開を試行するには次のリンクを使用します。

サービスの開始

Element properties:

TargetMicrosoft.SystemCenter.NTService
Parent MonitorSystem.Health.AvailabilityState
CategoryAvailabilityHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityLow
Alert Auto ResolveTrue
Monitor TypeMicrosoft.Windows.CheckNTServiceStateMonitorType
RemotableTrue
AccessibilityInternal
Alert Message
Windows サービス停止
コンピューター {1} の '{0}' サービスが実行を停止しました
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SystemCenter.NTService.ServiceStateMonitor" Accessibility="Internal" Target="Microsoft.SystemCenter.NTService" TypeID="Windows!Microsoft.Windows.CheckNTServiceStateMonitorType" ParentMonitorID="Health!System.Health.AvailabilityState" Enabled="true">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Microsoft.SystemCenter.NTService.ServiceStateMonitor.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Low</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="Microsoft.SystemCenter.NTService"]/DisplayName$</AlertParameter1>
<AlertParameter2>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</AlertParameter2>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState HealthState="Success" MonitorTypeStateID="Running" ID="Success"/>
<OperationalState HealthState="Error" MonitorTypeStateID="NotRunning" ID="Error"/>
</OperationalStates>
<Configuration>
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<ServiceName>$Target/Property[Type="Microsoft.SystemCenter.NTService"]/ServiceName$</ServiceName>
<CheckStartupType>true</CheckStartupType>
</Configuration>
</UnitMonitor>