MSSQL: SQL Server Custom Query Probe

Microsoft.SqlServer.Core.CustomMonitoring.ProbeAction.DBEngineCustomQueryMonitor (ProbeActionModuleType)

This probe module executes custom SQL query and verifies the results against specified conditions.

Element properties:

TypeProbeActionModuleType
IsolationAny
AccessibilityInternal
RunAsDefault
InputTypeSystem.BaseData
OutputTypeSystem.PropertyBagData

Source Code:

<ProbeActionModuleType ID="Microsoft.SqlServer.Core.CustomMonitoring.ProbeAction.DBEngineCustomQueryMonitor" Accessibility="Internal" Batching="false">
<Configuration>
<IncludeSchemaTypes>
<SchemaType>Microsoft.SqlServer.Core.CustomMonitoring.Schema.CustomQueryTypes</SchemaType>
</IncludeSchemaTypes>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="MachineName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="NetbiosComputerName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="InstanceName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ConnectionString" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="InstanceVersion" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="InstanceEdition" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="MonitoringType" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="MonitorName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="DatabaseName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="SqlQuery" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="WarningConditions" minOccurs="0" maxOccurs="1" type="TestConditionsType"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="WarningConditionPredicate" minOccurs="0" maxOccurs="1" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="CriticalConditions" minOccurs="0" maxOccurs="1" type="TestConditionsType"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="CriticalConditionPredicate" minOccurs="0" maxOccurs="1" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Login" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Password" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="SqlExecTimeoutSeconds" type="xsd:integer"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="SqlTimeoutSeconds" 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="Publisher" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ManagementGroupName" type="xsd:string"/>
</Configuration>
<ModuleImplementation>
<Managed>
<Assembly>Microsoft.SQLServer.CustomMonitoring.Module.ScomModules.Assembly</Assembly>
<Type>Microsoft.SQLServer.CustomMonitoring.Module.ScomModules.Modules.CustomQueryMonitor</Type>
</Managed>
</ModuleImplementation>
<OutputType>System!System.PropertyBagData</OutputType>
<InputType>System!System.BaseData</InputType>
</ProbeActionModuleType>