作业周期

Microsoft.SQLServer.2014.AgentJob.JobDuration (UnitMonitor)

监视代理作业周期。
请注意,任何版本的 SQL Server Express 均不支持 SQL Server 代理 Windows 服务,没有合适的发现对象。

Knowledge Base article:

摘要

SQL 2014 代理作业周期监视器。监视代理作业周期。如果最后一次作业执行的时间比严重阈值长,此监视器的状态将更改为严重状态。如果作业周期介于警告阈值和严重阈值之间,监视器会将其状态更改为警告。

可替代参数

名称

说明

默认值

严重阈值(分钟)

如果值超过此阈值,监视器会将其状态更改为“严重”。值介于此阈值与警告阈值(包括警告阈值)之间会导致监视器处于警告状态。

120

已启用

启用或禁用工作流。

生成警报

定义工作流是否生成警报。

间隔(秒)

运行工作流的重复间隔时间(秒)。

600

同步时间

使用 24 小时格式指定的同步时间。可以忽略。

 

超时(秒)

指定允许工作流在被关闭并标记为失败之前运行的时间。

300

警告阈值(分钟)

警告阈值。超过该阈值会导致监视器至少进入警告状态。

60

Element properties:

TargetMicrosoft.SQLServer.2014.AgentJob
Parent MonitorSystem.Health.PerformanceState
CategoryPerformanceCollection
EnabledTrue
Alert GenerateFalse
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SQLServer.2014.AgentLongRunningJobsProviderPerJob
RemotableTrue
AccessibilityPublic
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2014.AgentJob.JobDuration" Accessibility="Public" Enabled="true" Target="SQL2014Core!Microsoft.SQLServer.2014.AgentJob" ParentMonitorID="SystemHealth!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.2014.AgentLongRunningJobsProviderPerJob" ConfirmDelivery="false">
<Category>PerformanceCollection</Category>
<OperationalStates>
<OperationalState ID="UnderThreshold1" MonitorTypeStateID="UnderThreshold1" HealthState="Success"/>
<OperationalState ID="OverThreshold1UnderThreshold2" MonitorTypeStateID="OverThreshold1UnderThreshold2" HealthState="Warning"/>
<OperationalState ID="OverThreshold2" MonitorTypeStateID="OverThreshold2" HealthState="Error"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>600</IntervalSeconds>
<SyncTime/>
<ConnectionString>$Target/Host/Host/Property[Type="SQL2014Core!Microsoft.SQLServer.2014.DBEngine"]/ConnectionString$</ConnectionString>
<JobID>$Target/Property[Type="SQL2014Core!Microsoft.SQLServer.2014.AgentJob"]/JobID$</JobID>
<Threshold1>60</Threshold1>
<Threshold2>120</Threshold2>
<TimeoutSeconds>300</TimeoutSeconds>
</Configuration>
</UnitMonitor>