平均閾值
Microsoft.Windows.WmiBased.Performance.AverageThreshold (UnitMonitorType)
此 WMI 閾值監視會求取多個範例的平均值
Element properties:
Member Modules:
Overrideable Parameters:
Source Code:
<UnitMonitorType ID="Microsoft.Windows.WmiBased.Performance.AverageThreshold" Accessibility="Public">
<MonitorTypeStates>
<MonitorTypeState ID="UnderThreshold"/>
<MonitorTypeState ID="OverThreshold"/>
</MonitorTypeStates>
<Configuration>
<xsd:element name="NameSpace" type="xsd:string"/>
<xsd:element name="Query" type="xsd:string"/>
<xsd:element name="Frequency" type="xsd:unsignedInt"/>
<xsd:element name="ObjectName" type="xsd:string"/>
<xsd:element name="CounterName" type="xsd:string"/>
<xsd:element name="InstanceName" type="xsd:string"/>
<xsd:element name="Value" type="xsd:string"/>
<xsd:element minOccurs="1" maxOccurs="1" name="Threshold" type="xsd:double"/>
<xsd:element minOccurs="1" maxOccurs="1" name="NumSamples" type="xsd:unsignedInt"/>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="Frequency" Selector="$Config/Frequency$" ParameterType="int"/>
<OverrideableParameter ID="Threshold" ParameterType="double" Selector="$Config/Threshold$"/>
</OverrideableParameters>
<MonitorImplementation>
<MemberModules>
<DataSource ID="DataSource" TypeID="Microsoft.Windows.WmiPerfCounterProvider">
<NameSpace>$Config/NameSpace$</NameSpace>
<Query>$Config/Query$</Query>
<Frequency>$Config/Frequency$</Frequency>
<ObjectName>$Config/ObjectName$</ObjectName>
<CounterName>$Config/CounterName$</CounterName>
<InstanceName>$Config/InstanceName$</InstanceName>
<Value>$Config/Value$</Value>
</DataSource>
<ConditionDetection TypeID="Performance!System.Performance.AveragerCondition" ID="CDAverageThreshold">
<NumSamples>$Config/NumSamples$</NumSamples>
</ConditionDetection>
<ConditionDetection TypeID="System!System.ExpressionFilter" ID="CDOverThreshold">
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Double">Value</XPathQuery>
</ValueExpression>
<Operator>Greater</Operator>
<ValueExpression>
<Value Type="Double">$Config/Threshold$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</ConditionDetection>
<ConditionDetection TypeID="System!System.ExpressionFilter" ID="CDUnderThreshold">
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Double">Value</XPathQuery>
</ValueExpression>
<Operator>LessEqual</Operator>
<ValueExpression>
<Value Type="Double">$Config/Threshold$</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</ConditionDetection>
</MemberModules>
<RegularDetections>
<RegularDetection MonitorTypeStateID="UnderThreshold">
<Node ID="CDUnderThreshold">
<Node ID="CDAverageThreshold">
<Node ID="DataSource"/>
</Node>
</Node>
</RegularDetection>
<RegularDetection MonitorTypeStateID="OverThreshold">
<Node ID="CDOverThreshold">
<Node ID="CDAverageThreshold">
<Node ID="DataSource"/>
</Node>
</Node>
</RegularDetection>
</RegularDetections>
</MonitorImplementation>
</UnitMonitorType>