SQL Server Agent Windows Service

Microsoft.SQLServer.2008.Agent.ServiceMonitor (UnitMonitor)

Knowledge Base article:

Summary

This monitor checks the status of the SQL Agent service for this instance of SQL Sever. State will change to an Error state and an alert generated when the service is not running.

If the SQL Agent service is configured to be disabled, no state change or alert will be generated.

Causes

A service can stop for many reasons, including:

Resolutions

You can attempt to restart the Windows service for the SQL agent by using the following link:

Start SQL Agent service

Element properties:

TargetMicrosoft.SQLServer.2008.Agent
Parent MonitorSystem.Health.AvailabilityState
CategoryAvailabilityHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.Windows.CheckNTServiceStateMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
SQL Server Agent Windows Stopped
The Windows service for the SQL Server Agent for instance {1} has stopped on computer {0}
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2008.Agent.ServiceMonitor" Accessibility="Public" Enabled="true" Target="SQL2008Core!Microsoft.SQLServer.2008.Agent" ParentMonitorID="SystemHealth!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="Windows!Microsoft.Windows.CheckNTServiceStateMonitorType" ConfirmDelivery="false">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.2008.Agent.ServiceMonitor.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</AlertParameter1>
<AlertParameter2>$Target/Host/Property[Type="SQL!Microsoft.SQLServer.ServerRole"]/InstanceName$</AlertParameter2>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Success" MonitorTypeStateID="Running" HealthState="Success"/>
<OperationalState ID="Error" MonitorTypeStateID="NotRunning" HealthState="Error"/>
</OperationalStates>
<Configuration>
<ComputerName>$Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<ServiceName>$Target/Property[Type="SQL!Microsoft.SQLServer.Agent"]/ServiceName$</ServiceName>
<CheckStartupType>true</CheckStartupType>
</Configuration>
</UnitMonitor>