一般服務健全狀況

Microsoft.Unix.Generic.Service.Monitor (UnitMonitor)

一般服務監視

Knowledge Base article:

摘要

此處理序監視會監看服務或服務精靈處理序是否正在執行。

原因

發生失敗表示服務已關閉。服務可能會因許多原因而停止,其中包括:

解決方式

執行 ps -ef | grep {servicename} 來檢查系統上的服務,其中{servicename} 是指要監視的服務名稱。

Element properties:

TargetMicrosoft.SystemCenter.UnixService
Parent MonitorSystem.Health.AvailabilityState
CategoryAvailabilityHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.Unix.WSMan.Process.Status.MonitorType
RemotableTrue
AccessibilityPublic
Alert Message
Unix 服務監視警示
伺服器 {0} 上的 {1} 服務並未執行。
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.Unix.Generic.Service.Monitor" Accessibility="Public" Target="Microsoft.SystemCenter.UnixService" TypeID="Unix!Microsoft.Unix.WSMan.Process.Status.MonitorType" Enabled="true" ParentMonitorID="Health!System.Health.AvailabilityState">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Microsoft.Unix.Generic.Service.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Host/Property[Type="Unix!Microsoft.Unix.Computer"]/PrincipalName$</AlertParameter1>
<AlertParameter2>$Target/Property[Type="Microsoft.SystemCenter.UnixService"]/ServiceName$</AlertParameter2>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState HealthState="Success" MonitorTypeStateID="Running" ID="Running"/>
<OperationalState HealthState="Error" MonitorTypeStateID="NotRunning" ID="NotRunning"/>
</OperationalStates>
<Configuration>
<TargetSystem>$Target/Host/Property[Type="Unix!Microsoft.Unix.Computer"]/NetworkName$</TargetSystem>
<ProcessName>$Target/Property[Type="Microsoft.SystemCenter.UnixService"]/ServiceName$</ProcessName>
<Interval>300</Interval>
</Configuration>
</UnitMonitor>