Service Availability monitor type

Microsoft.SQLServer.ReportingServices.Windows.MonitorType.Instance.WindowsServiceState (UnitMonitorType)

Service Availability monitor type for Reporting Services

Element properties:

RunAsMicrosoft.SQLServer.Core.RunAs.Monitoring
AccessibilityInternal
Support Monitor RecalculateFalse

Member Modules:

ID Module Type TypeId RunAs 
Trigger DataSource System.Scheduler Default
CheckServiceState ProbeAction Microsoft.SQLServer.ReportingServices.Windows.ProbeAction.WindowsServiceState Default
ServiceNotRunning ConditionDetection System.ExpressionFilter.IntervalSuppression Default
ServiceRunning ConditionDetection System.ExpressionFilter Default

Overrideable Parameters:

IDParameterTypeSelectorDisplay NameDescription
CheckStartupTypebool$Config/CheckStartupType$Alert, only if service startup type is automaticThis may be set to 'true' or 'false' only. The workflow will not consider the current startup type setting of the service if this parameter is set to 'false'. The default is 'true'.
SampleCountint$Config/SampleCount$Number of samplesIndicates, how many times a measured value should breach a threshold before the state is changed.
TimeoutSecondsint$Config/TimeoutSeconds$Timeout (seconds)Specifies the time the workflow is allowed to run before being closed and marked as failed.
IntervalSecondsint$Config/IntervalSeconds$Interval (seconds)The recurring interval of time in seconds in which to run the workflow.
SyncTimestring$Config/SyncTime$Synchronization TimeThe synchronization time specified by using a 24-hour format. May be omitted.

Source Code:

<UnitMonitorType ID="Microsoft.SQLServer.ReportingServices.Windows.MonitorType.Instance.WindowsServiceState" Accessibility="Internal" RunAs="SqlCoreLib!Microsoft.SQLServer.Core.RunAs.Monitoring">
<MonitorTypeStates>
<MonitorTypeState ID="Running" NoDetection="false"/>
<MonitorTypeState ID="NotRunning" NoDetection="false"/>
</MonitorTypeStates>
<Configuration>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ServiceName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="CheckStartupType" type="xsd:boolean"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="1" name="SampleCount" type="xsd:int"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="TimeoutSeconds" type="xsd:integer"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="IntervalSeconds" type="xsd:int"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="SyncTime" type="xsd:string"/>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="CheckStartupType" ParameterType="bool" Selector="$Config/CheckStartupType$"/>
<OverrideableParameter ID="SampleCount" ParameterType="int" Selector="$Config/SampleCount$"/>
<OverrideableParameter ID="TimeoutSeconds" ParameterType="int" Selector="$Config/TimeoutSeconds$"/>
<OverrideableParameter ID="IntervalSeconds" ParameterType="int" Selector="$Config/IntervalSeconds$"/>
<OverrideableParameter ID="SyncTime" ParameterType="string" Selector="$Config/SyncTime$"/>
</OverrideableParameters>
<MonitorImplementation>
<MemberModules>
<DataSource ID="Trigger" TypeID="System!System.Scheduler">
<Scheduler>
<SimpleReccuringSchedule>
<Interval>$Config/IntervalSeconds$</Interval>
<SyncTime>$Config/SyncTime$</SyncTime>
</SimpleReccuringSchedule>
<ExcludeDates/>
</Scheduler>
</DataSource>
<ProbeAction ID="CheckServiceState" TypeID="Microsoft.SQLServer.ReportingServices.Windows.ProbeAction.WindowsServiceState">
<ServiceName>$Config/ServiceName$</ServiceName>
<CheckStartupType>$Config/CheckStartupType$</CheckStartupType>
<TimeoutSeconds>$Config/TimeoutSeconds$</TimeoutSeconds>
<Publisher>SQLReportingServicesMonitoringWindows</Publisher>
<ManagementGroupName>$Target/ManagementGroup/Name$</ManagementGroupName>
</ProbeAction>
<ConditionDetection ID="ServiceRunning" TypeID="System!System.ExpressionFilter">
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='ServiceState']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">Running</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</ConditionDetection>
<ConditionDetection ID="ServiceNotRunning" TypeID="System!System.ExpressionFilter.IntervalSuppression">
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='ServiceState']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">NotRunning</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<SuppressionSettings>
<MatchCount>$Config/SampleCount$</MatchCount>
<SampleCount>$Config/SampleCount$</SampleCount>
</SuppressionSettings>
</ConditionDetection>
</MemberModules>
<RegularDetections>
<RegularDetection MonitorTypeStateID="Running">
<Node ID="ServiceRunning">
<Node ID="CheckServiceState">
<Node ID="Trigger"/>
</Node>
</Node>
</RegularDetection>
<RegularDetection MonitorTypeStateID="NotRunning">
<Node ID="ServiceNotRunning">
<Node ID="CheckServiceState">
<Node ID="Trigger"/>
</Node>
</Node>
</RegularDetection>
</RegularDetections>
</MonitorImplementation>
</UnitMonitorType>