Generic UNIX/Linux Service Health

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

Generic UNIX/Linux Service Monitor

Knowledge Base article:

Summary

This process monitor watches for a Service or Daemon process to be running.

Causes

A failure indicates that the service is down. A service can stop for many reasons, including:

Resolutions

Check the service on the system by running ps -ef | grep {servicename}, where {servicename} is the name of the service being monitored.

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/Linux Service Monitor Alert
The {1} Service on server {0} is not running.
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>