Microsoft.SqlServer.Core.CustomMonitoring.UIPageSet.CustomQueryTwoStateMonitor (UIPageSet)

Element properties:

Type DefinitionMicrosoft.SqlServer.Core.CustomMonitoring.MonitorType.DBEngine.CustomQueryTwoState

Source Code:

<UIPageSet ID="Microsoft.SqlServer.Core.CustomMonitoring.UIPageSet.CustomQueryTwoStateMonitor" TypeDefinitionID="Microsoft.SqlServer.Core.CustomMonitoring.MonitorType.DBEngine.CustomQueryTwoState">
<UIPageReferences>
<UIPageReference ID="Microsoft.SqlServer.Core.CustomMonitoring.UIPageSet.CustomQueryTwoStateMonitor.Reference1" PageID="Microsoft.SqlServer.Core.CustomMonitoring.UIPage.MonitorGeneralPage">
<InputParameters/>
<InputTransform/>
</UIPageReference>
<UIPageReference ID="Microsoft.SqlServer.Core.CustomMonitoring.UIPageSet.CustomQueryTwoStateMonitor.Reference2" PageID="Microsoft.SqlServer.Core.CustomMonitoring.UIPage.SqlQueryPage">
<InputParameters/>
<InputTransform>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
<xsl:template match="/">
<xsl:element name="Configuration">
<xsl:copy-of select="DatabaseName"/>
<xsl:copy-of select="SqlQuery"/>
<xsl:copy-of select="TimeoutSeconds"/>
<xsl:copy-of select="SqlTimeoutSeconds"/>
<xsl:copy-of select="SqlExecTimeoutSeconds"/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
</InputTransform>
</UIPageReference>
<UIPageReference ID="Microsoft.SqlServer.Core.CustomMonitoring.UIPageSet.CustomQueryTwoStateMonitor.Reference3" PageID="Microsoft.SqlServer.Core.CustomMonitoring.UIPage.TestConditionsPage">
<InputParameters>
<ConditionsElementName>Conditions</ConditionsElementName>
<ConditionPredicateElementName>ConditionPredicate</ConditionPredicateElementName>
</InputParameters>
<InputTransform>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
<xsl:template match="/">
<xsl:element name="Configuration">
<xsl:copy-of select="Conditions"/>
<xsl:copy-of select="ConditionPredicate"/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
</InputTransform>
</UIPageReference>
<UIPageReference ID="Microsoft.SqlServer.Core.CustomMonitoring.UIPageSet.CustomQueryTwoStateMonitor.Reference4" PageID="System!System.SimpleSchedulerPage">
<InputParameters/>
<InputTransform>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
<xsl:template match="/">
<xsl:element name="SimpleReccuringSchedule">
<xsl:element name="Interval">
<xsl:choose>
<xsl:when test="IntervalSeconds">
<xsl:value-of select="IntervalSeconds"/>
</xsl:when>
<xsl:otherwise>900</xsl:otherwise>
</xsl:choose>
</xsl:element>
<xsl:if test="boolean(string-length(SyncTime))">
<xsl:copy-of select="SyncTime"/>
</xsl:if>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
</InputTransform>
</UIPageReference>
<UIPageReference ID="Microsoft.SqlServer.Core.CustomMonitoring.UIPageSet.CustomQueryTwoStateMonitor.Reference5" PageID="Health!System.Health.OperationalStatesConfigPage">
<InputParameters>
<Failed>Error</Failed>
<Passed>Success</Passed>
</InputParameters>
<InputTransform/>
</UIPageReference>
<UIPageReference ID="Microsoft.SqlServer.Core.CustomMonitoring.UIPageSet.CustomQueryTwoStateMonitor.Reference6" PageID="Health!System.Health.ProductKnowledgePage">
<InputParameters/>
<InputTransform/>
</UIPageReference>
<UIPageReference ID="Microsoft.SqlServer.Core.CustomMonitoring.UIPageSet.CustomQueryTwoStateMonitor.Reference7" PageID="Microsoft.SqlServer.Core.CustomMonitoring.UIPage.AlertingPage">
<InputParameters/>
<InputTransform/>
</UIPageReference>
</UIPageReferences>
<OutputTransform>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
<xsl:template match="/">
<xsl:element name="MachineName">
<xsl:value-of select="/PropertyReferenceMachineName"/>
</xsl:element>
<xsl:element name="NetbiosComputerName">
<xsl:value-of select="/PropertyReferenceNetbiosComputerName"/>
</xsl:element>
<xsl:element name="InstanceName">
<xsl:value-of select="/PropertyReferenceInstanceName"/>
</xsl:element>
<xsl:element name="ConnectionString">
<xsl:value-of select="/PropertyReferenceConnectionString"/>
</xsl:element>
<xsl:element name="InstanceVersion">
<xsl:value-of select="/PropertyReferenceInstanceVersion"/>
</xsl:element>
<xsl:element name="InstanceEdition">
<xsl:value-of select="/PropertyReferenceInstanceEdition"/>
</xsl:element>
<xsl:if test="/PropertyReferenceMonitoringType">
<xsl:element name="MonitoringType">
<xsl:value-of select="/PropertyReferenceMonitoringType"/>
</xsl:element>
</xsl:if>
<xsl:copy-of select="/MonitorName"/>
<xsl:copy-of select="/DatabaseName"/>
<xsl:copy-of select="/SqlQuery"/>
<xsl:copy-of select="/Conditions"/>
<xsl:copy-of select="/ConditionPredicate"/>
<xsl:copy-of select="/SqlExecTimeoutSeconds"/>
<xsl:copy-of select="/SqlTimeoutSeconds"/>
<xsl:copy-of select="/TimeoutSeconds"/>
<xsl:element name="IntervalSeconds">
<xsl:variable name="RawInterval" select="/SimpleReccuringSchedule/Interval"/>
<xsl:variable name="Units" select="/SimpleReccuringSchedule/Interval/@Unit"/>
<xsl:choose>
<xsl:when test="not(boolean($Units)) or $Units='Seconds'">
<xsl:value-of select="$RawInterval"/>
</xsl:when>
<xsl:when test="$Units='Minutes'">
<xsl:value-of select="$RawInterval*60"/>
</xsl:when>
<xsl:when test="$Units='Hours'">
<xsl:value-of select="$RawInterval*3600"/>
</xsl:when>
<xsl:when test="$Units='Days'">
<xsl:value-of select="$RawInterval*86400"/>
</xsl:when>
</xsl:choose>
</xsl:element>
<xsl:element name="SyncTime">
<xsl:value-of select="/SimpleReccuringSchedule/SyncTime"/>
</xsl:element>
<xsl:element name="Publisher">
<xsl:value-of select="/PropertyReferencePublisher"/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
</OutputTransform>
</UIPageSet>