Windows 服务状态

Microsoft.SQLServer.2012.ReportingServices.UnitMonitor.WindowsServiceState (UnitMonitor)

如果 SSRS Windows 服务器不在运行状态的时间长于阈值,监视器将发出警报。

Knowledge Base article:

摘要

此监视器将检查 SQL Reporting Services Windows 服务的状态。

原因

此监视器的“未在运行”状态指示 SQL Reporting Services 服务配置为自动启动,但在特定的时间段中处于“已停止”状态。此时间段在监视器属性中定义且无法替代。该值默认为 900 秒(15 分钟)。如果 SQL Reporting Services 比该时间更快地转换回“正在运行”状态,则意味着该服务刚被重置。

如果此监视器在特定环境下导致过多的干扰,请增加“不可用时间”值。而如果它导致过长的延迟,请减少“不可用时间”值。

通常情况下,Windows 服务可以因多种原因停止,这些原因包括:

解决方法

你可以使用以下链接查看可能与此问题相关的 SQL Reporting Services™ 实例的其他警报:

查看 SQL Reporting Services 警报

可替代参数

名称

说明

默认值

仅当服务启动类型为“自动”时发出警报

此值仅可设置为 "true" 或 "false"。如果此参数设置为 "false",工作流将不会考虑服务的当前启动类型设置。默认值为 "true"。

已启用

启用或禁用工作流

生成警报

定义工作流是否生成警报

间隔(秒)

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

60

样本数

指示在状态发生更改之前测量值应违反阈值的次数。

15

同步时间

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

 

超时(秒)

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

300

Element properties:

TargetMicrosoft.SQLServer.2012.ReportingServices.Instance
Parent MonitorSystem.Health.AvailabilityState
CategoryAvailabilityHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SQLServer.2012.ReportingServices.MonitorType.Instance.WindowsServiceState
RemotableTrue
AccessibilityPublic
Alert Message
SSRS 2012: Windows 服务已停止
计算机 {0} 上的 Reporting Services 实例 {1} 的 Windows 服务已停止
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2012.ReportingServices.UnitMonitor.WindowsServiceState" Accessibility="Public" Enabled="true" Target="SQLRS!Microsoft.SQLServer.2012.ReportingServices.Instance" ParentMonitorID="SystemHealth!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.2012.ReportingServices.MonitorType.Instance.WindowsServiceState" ConfirmDelivery="false">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.2012.ReportingServices.UnitMonitor.WindowsServiceState.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</AlertParameter1>
<AlertParameter2>$Target/Property[Type="SQLRS!Microsoft.SQLServer.2012.ReportingServices.Instance"]/InstanceName$</AlertParameter2>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Success" MonitorTypeStateID="Running" HealthState="Success"/>
<OperationalState ID="Error" MonitorTypeStateID="NotRunning" HealthState="Error"/>
</OperationalStates>
<Configuration>
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<ServiceName>$Target/Property[Type="SQLRS!Microsoft.SQLServer.2012.ReportingServices.Instance"]/ServiceName$</ServiceName>
<CheckStartupType>true</CheckStartupType>
<SampleCount>15</SampleCount>
<IntervalSeconds>60</IntervalSeconds>
<SyncTime/>
<TimeoutSeconds>300</TimeoutSeconds>
</Configuration>
</UnitMonitor>