ジョブ期間

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

エージェント ジョブ期間を監視します。
SQL Server エージェントの Windows サービスは、いずれのエディションの SQL Server Express でもサポートされていないため、適切な検出されたオブジェクトがないことにご注意ください。

Knowledge Base article:

概要

SQL 2016 エージェント ジョブ期間モニター。 エージェント ジョブ期間を監視します。このモニターは、最後のジョブ実行が重大なしきい値よりも時間がかかっている場合、状態を重大な状態に変更します。ジョブの継続時間が警告のしきい値と重大なしきい値の間の場合は、状態を警告に変更します。

上書き可能なパラメーター

名前

説明

既定値

重大しきい値 (分単位)

このモニターは、値がこのしきい値を超えた場合、状態を重大に変更します。このしきい値と警告しきい値の間 (両端を含む) にある場合、モニターは警告状態になります。

120

有効

ワークフローを有効または無効にします。

はい

アラートを生成する

ワークフローがアラートを生成するかどうかを定義します。

いいえ

間隔 (秒)

ワークフローを実行する定期的な実行間隔 (秒)。

600

同期時刻

24 時間形式で指定した同期時刻。省略可能です。

 

タイムアウト (秒)

ワークフローが終了して失敗とマークされるまでの、ワークフローの許容実行時間を指定します。

300

警告しきい値 (分単位)

警告しきい値。このしきい値を超えると、モニターが少なくとも警告状態に変わります。

60

Element properties:

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

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2016.AgentJob.JobDuration" Accessibility="Public" Enabled="true" Target="SQL2016Core!Microsoft.SQLServer.2016.AgentJob" ParentMonitorID="SystemHealth!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.2016.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="SQL2016Core!Microsoft.SQLServer.2016.DBEngine"]/ConnectionString$</ConnectionString>
<JobID>$Target/Property[Type="SQL2016Core!Microsoft.SQLServer.2016.AgentJob"]/JobID$</JobID>
<Threshold1>60</Threshold1>
<Threshold2>120</Threshold2>
<TimeoutSeconds>300</TimeoutSeconds>
</Configuration>
</UnitMonitor>