Microsoft KMS ServerRole Service Monitor

Microsoft.KMS.ServerRole.Service.Monitor (UnitMonitor)

Knowledge Base article:

Summary

Monitors the status of the Key Management Service and generates an alert when the service is not running.

Causes

A service can stop for many reasons, including:

Resolutions

You can attempt to restart the service

Element properties:

TargetMicrosoft.KMS.ServerRole
Parent MonitorSystem.Health.AvailabilityState
CategoryAvailabilityHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.KMS.ServerRole.Service.MonitorType
RemotableTrue
AccessibilityPublic
Alert Message
KMS ServerRole Service Is Not Running
The Service: {0} is not running on Computer: {1}
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.KMS.ServerRole.Service.Monitor" Accessibility="Public" Enabled="true" Target="Microsoft.KMS.ServerRole" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="Microsoft.KMS.ServerRole.Service.MonitorType" ConfirmDelivery="false">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Microsoft.KMS.ServerRole.Service.Monitor.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Data/Context/Property[@Name='Name']$</AlertParameter1>
<AlertParameter2>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</AlertParameter2>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Running" MonitorTypeStateID="Running" HealthState="Success"/>
<OperationalState ID="NotRunning" MonitorTypeStateID="NotRunning" HealthState="Warning"/>
</OperationalStates>
<Configuration>
<ComputerName/>
<ServiceName>$Target/Property[Type="Microsoft.KMS.ServerRole"]/ImageName$</ServiceName>
<IntervalSeconds>60</IntervalSeconds>
<CheckStartupType>true</CheckStartupType>
<Samples>5</Samples>
</Configuration>
</UnitMonitor>