此監視器會檢查此 SQL Server 執行個體的 SQL Agent 服務狀態。
請注意,所有版本的 SQL Server Express 皆不支援 SQL Server Agent Windows 服務。
此監視器會檢查 SQL Agent 服務的狀態,在該服務設定為自動啟動但卻未執行時產生警示。
請注意,停用此服務時,不會產生警示 - 將會顯示狀況良好的狀態。
服務可能會因許多原因而停止,其中包括:
系統管理員已停止服務。
因為無法驗證使用者帳戶,所以導致服務無法啟動。
服務發生使該服務停止的例外狀況。
服務未正確設定,故無法啟動。
此服務所依存的另一項服務 (例如 SQL Server) 已停止
您可嘗試為 SQL Agent 重新啟動 Linux 服務
名稱 | 描述 | 預設值 |
警示優先順序 | 定義警示優先順序。 | 標準 |
警示嚴重性 | 定義警示嚴重性。 | MatchMonitorHealth |
只有服務啟動類型為自動時才會發出警示 | 其只可設定為 'true' 或 'false'。如果設定為 'false',則不論啟動類型設定為何,都會觸發警示。預設值為 'true'。 | 是 |
已啟用 | 啟用或停用該工作流程。 | 是 |
產生警示 | 定義工作流程是否要產生警示。 | 是 |
間隔 (秒) | 每次重複執行工作流程之間的時間間隔 (秒)。 | 600 |
同步處理時間 | 同步處理時間使用 24 小時制。可予省略。 |
|
逾時 (秒) | 指定流程被關閉及標示為失敗之前,允許執行的時間。 | 300 |
資料庫連線的逾時 (秒) | 若工作流程無法在指定的期限之內存取資料庫,將會失敗並登錄一則事件。 | 15 |
Target | Microsoft.SQLServer.Linux.Agent | ||
Parent Monitor | System.Health.AvailabilityState | ||
Category | AvailabilityHealth | ||
Enabled | True | ||
Alert Generate | True | ||
Alert Severity | MatchMonitorHealth | ||
Alert Priority | Normal | ||
Alert Auto Resolve | True | ||
Monitor Type | Microsoft.SQLServer.Linux.MonitorType.SqlServiceStatus | ||
Remotable | True | ||
Accessibility | Public | ||
Alert Message |
| ||
RunAs | Default |
<UnitMonitor ID="Microsoft.SQLServer.Linux.Monitor.Agent.ServiceStatus" Accessibility="Public" Enabled="true" Target="SqlDiscL!Microsoft.SQLServer.Linux.Agent" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.Linux.MonitorType.SqlServiceStatus" ConfirmDelivery="false">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.Linux.Monitor.Agent.ServiceStatus.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/MachineName$</AlertParameter1>
<AlertParameter2>$Target/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/InstanceName$</AlertParameter2>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Success" MonitorTypeStateID="Running" HealthState="Success"/>
<OperationalState ID="Warning" MonitorTypeStateID="UnableToDetectStatus" HealthState="Warning"/>
<OperationalState ID="Error" MonitorTypeStateID="NotRunning" HealthState="Error"/>
</OperationalStates>
<Configuration>
<MachineName>$Target/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/MachineName$</MachineName>
<NetbiosComputerName>$Target/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/NetbiosComputerName$</NetbiosComputerName>
<InstanceName>$Target/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/InstanceName$</InstanceName>
<ConnectionString>$Target/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/ConnectionString$</ConnectionString>
<InstanceVersion>$Target/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/Version$</InstanceVersion>
<InstanceEdition>$Target/Host/Property[Type="SqlCoreLib!Microsoft.SQLServer.Core.DBEngine"]/Edition$</InstanceEdition>
<ServiceType>Agent</ServiceType>
<CheckStartupType>true</CheckStartupType>
<UnavailableTime>900</UnavailableTime>
<SqlTimeoutSeconds>15</SqlTimeoutSeconds>
<TimeoutSeconds>300</TimeoutSeconds>
<IntervalSeconds>600</IntervalSeconds>
<SyncTime/>
</Configuration>
</UnitMonitor>