MSSQL 2014: DB Engine Thread Count monitor type

Microsoft.SQLServer.2014.DBEngine.ThreadCount.MonitorType (UnitMonitorType)

DB Engine Thread Count monitor type for 2014 Databases.

Element properties:

RunAsMicrosoft.SQLServer.2014.SQLProbeAccount
AccessibilityInternal
Support Monitor RecalculateFalse

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.SQLServer.2014.DBEngine.ThreadCountMonitor.DataSourceMapped Default
CSC ConditionDetection System.Performance.ConsecutiveSamplesCondition Default
ErrorCondition ConditionDetection System.ExpressionFilter Default
NormalCondition ConditionDetection System.ExpressionFilter Default

Overrideable Parameters:

IDParameterTypeSelectorDisplay NameDescription
IntervalSecondsint$Config/IntervalSeconds$Interval (seconds)The recurring interval of time in seconds in which to run the workflow.
TimeoutSecondsint$Config/TimeoutSeconds$Timeout (seconds)Specifies the time the workflow is allowed to run before being closed and marked as failed.
MinFreeThreadsCountint$Config/MinFreeThreadsCount$Minimum Free Threads ThresholdThe workflow determines the maximum number of threads and the number of active threads for each DB Engine process. An alert will be generated if the number of free threads is less or equal than this parameter.
NumSamplesint$Config/NumSamples$Number of samplesIndicates how many times a measured value should breach a threshold before the state is changed.
SyncTimestring$Config/SyncTime$Synchronization TimeThe synchronization time specified by using a 24-hour format. May be omitted.
CacheExpirationTimeint$Config/CacheExpirationTime$Cache Expiration TimeSpecifies the maximum age of information from cache the workflow can use. May be omitted.

Source Code:

<UnitMonitorType ID="Microsoft.SQLServer.2014.DBEngine.ThreadCount.MonitorType" Accessibility="Internal" RunAs="SQL2014Core!Microsoft.SQLServer.2014.SQLProbeAccount">
<MonitorTypeStates>
<MonitorTypeState ID="Normal"/>
<MonitorTypeState ID="Error"/>
</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="IntervalSeconds" type="xsd:integer"/>
<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="MinFreeThreadsCount" type="xsd:integer"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="NumSamples" type="xsd:integer"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="SyncTime" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="0" name="CacheExpirationTime" type="xsd:int"/>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="IntervalSeconds" Selector="$Config/IntervalSeconds$" ParameterType="int"/>
<OverrideableParameter ID="TimeoutSeconds" Selector="$Config/TimeoutSeconds$" ParameterType="int"/>
<OverrideableParameter ID="MinFreeThreadsCount" Selector="$Config/MinFreeThreadsCount$" ParameterType="int"/>
<OverrideableParameter ID="NumSamples" Selector="$Config/NumSamples$" ParameterType="int"/>
<OverrideableParameter ID="SyncTime" Selector="$Config/SyncTime$" ParameterType="string"/>
<OverrideableParameter ID="CacheExpirationTime" Selector="$Config/CacheExpirationTime$" ParameterType="int"/>
</OverrideableParameters>
<MonitorImplementation>
<MemberModules>
<DataSource ID="DS" TypeID="Microsoft.SQLServer.2014.DBEngine.ThreadCountMonitor.DataSourceMapped">
<ServiceName>$Config/ServiceName$</ServiceName>
<IntervalSeconds>$Config/IntervalSeconds$</IntervalSeconds>
<TimeoutSeconds>$Config/TimeoutSeconds$</TimeoutSeconds>
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<SyncTime>$Config/SyncTime$</SyncTime>
<CacheExpirationTime>$Config/CacheExpirationTime$</CacheExpirationTime>
</DataSource>
<ConditionDetection ID="CSC" TypeID="SystemPerf!System.Performance.ConsecutiveSamplesCondition">
<Threshold>$Config/MinFreeThreadsCount$</Threshold>
<Direction>lessequal</Direction>
</ConditionDetection>
<ConditionDetection ID="NormalCondition" TypeID="System!System.ExpressionFilter">
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Double">Value</XPathQuery>
</ValueExpression>
<Operator>Less</Operator>
<ValueExpression>
<Value Type="Double">$Config/NumSamples$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</ConditionDetection>
<ConditionDetection ID="ErrorCondition" TypeID="System!System.ExpressionFilter">
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Double">Value</XPathQuery>
</ValueExpression>
<Operator>GreaterEqual</Operator>
<ValueExpression>
<Value Type="Double">$Config/NumSamples$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</ConditionDetection>
</MemberModules>
<RegularDetections>
<RegularDetection MonitorTypeStateID="Normal">
<Node ID="NormalCondition">
<Node ID="CSC">
<Node ID="DS"/>
</Node>
</Node>
</RegularDetection>
<RegularDetection MonitorTypeStateID="Error">
<Node ID="ErrorCondition">
<Node ID="CSC">
<Node ID="DS"/>
</Node>
</Node>
</RegularDetection>
</RegularDetections>
</MonitorImplementation>
</UnitMonitorType>