System.Performance.AverageThresholdCondition
Applies To: Operations Manager 2007 R2
The System.Performance.AverageThresholdCondition condition detection module type calculates the average value of a specified number of input values and returns data only if the average value exceeds specified threshold condition. This module accepts System.Performance.Data as the input data type and outputs System.Performance.Data data.
Usage
Use this module type within a workflow to provide a threshold filter to the specified number of performance samples and to output the average value.
Type Definition
<ConditionDetectionModuleType ID="System.Performance.AverageThresholdCondition" Accessibility="Public" Batching="false" Stateful="true" PassThrough="false">
<Configuration>
<IncludeSchemaTypes>
<SchemaType>System!System.ExpressionEvaluatorSchema</SchemaType>
</IncludeSchemaTypes>
<xsd:element name="NumSamples" type="xsd:unsignedInt" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
<xsd:element name="Threshold" type="xsd:double" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
<xsd:element name="Operator" type="CriteriaCompareType" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="Threshold" Selector="$Config/Threshold$" ParameterType="double" />
<OverrideableParameter ID="NumSamples" Selector="$Config/NumSamples$" ParameterType="int" />
</OverrideableParameters>
<ModuleImplementation Isolation="Any">
<Composite>
<MemberModules>
<ConditionDetection ID="AveragerCondition" TypeID="System.Performance.AveragerCondition">
<NumSamples>$Config/NumSamples$</NumSamples>
</ConditionDetection>
<ConditionDetection ID="ThresholdCondition" TypeID="System.Performance.SimpleThresholdCondition">
<Threshold>$Config/Threshold$</Threshold>
<Operator>$Config/Operator$</Operator>
</ConditionDetection>
</MemberModules>
<Composition>
<Node ID="ThresholdCondition">
<Node ID="AveragerCondition" />
</Node>
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>System.Performance.Data</OutputType>
<InputTypes>
<InputType>System.Performance.Data</InputType>
</InputTypes>
</ConditionDetectionModuleType>
Parameters
The System.Performance.AverageThresholdCondition module supports the configuration parameters described in the following table.
Parameter | Type | Overrideable | Description |
---|---|---|---|
NumSamples |
Unsigned Integer |
True |
Contains the number of samples to average over. |
Threshold |
Double |
True |
Required parameter. The double value that defines the threshold to be used in the expression. |
Operator |
False |
Required parameter. The operator to use to compare the incoming performance data to the threshold. |
Threshold
The Threshold parameter represents the threshold value to compare against the incoming data item. The value is cast as a Double data type. For more information about casting values in expressions, see ValueExpressionType.
Composition
The System.Performance.AverageThresholdCondition composite module contains the member modules described in the following table.
Workflow Run Order | Module Type | Usage |
---|---|---|
1 |
Generates the average value out of the specified number of sample values. |
|
2 |
Returns the performance data if it exceeds the specified threshold value. |
Remarks
For more information about how the average is calculated, see System.Performance.AveragerCondition.
Related Modules
Module Type | Usage |
---|---|
Outputs performance data if the specified threshold is exceeded by the delta value of performance samples. |
External Module References
None.
Sample
The following XML sample illustrates a rule that calculates the average number of handles in the specified process over a 10-minute period. If the resulting average is greater than 2000, an alert is generated.
<Rule ID="Microsoft.Samples.HandleCountThreshold" Enabled="true" Target="Microsoft.Windows.Computer.Server " ConfirmDelivery="false" Remotable="false" Priority="High" DiscardLevel="100">
<Category>Maintenance</Category>
<DataSources>
<DataSource ID="DataSource" TypeID="Performance!System.Performance.DataProvider">
<CounterName>Handle Count</CounterName>
<ObjectName>Process</ObjectName>
<InstanceName>adtagent</InstanceName>
<Frequency>120</Frequency>
</DataSource>
</DataSources>
<ConditionDetection ID="CDAveragerThreshold" TypeID="Performance!System.Performance.AverageThresholdCondition">
<NumSamples>5</NumSamples>
<Threshold>2000</Threshold>
<Operator>Greater</Operator>
</ConditionDetection>
<WriteActions>
<WriteAction ID="GenerateAlert" TypeID="Health!System.Health.GenerateAlert">
<Priority>1</Priority>
<Severity>1</Severity>
<AlertMessageId>$MPElement[Name="Microsoft.Samples.AlertMessage"]$</AlertMessageId>
</WriteAction>
</WriteActions>
</Rule>
Below is a sample data item that could be returned by the System.Performance.AverageThresholdCondition module. The Value
element represents the average value of all 5 samples taken over a 10-minute period.
<DataItem type="System.Performance.Data" time="2008-03-11T03:08:55.0343534-08:00" sourceHealthServiceId="0A0800A0-A802-E90B-6045-D961D516CA78">
<TimeSampled>2008-03-11T03:08:55.0343534-08:00</TimeSampled>
<ObjectName>Process</ObjectName>
<CounterName>Handle Count</CounterName>
<InstanceName>adtagent</InstanceName>
<IsNull Type="Boolean">false</IsNull>
<Value>2010</Value>
<SampleCount>5</SampleCount>
</DataItem>
Important
The System.Performance.DataProvider module’s output performance data item also contains a Value
element. However, the System.Performance.DataProvider module’s Value
element represents the actual value of the counter at the time the sample was taken.
Information
Module Type |
|
Input Type |
|
Output Type |
|
Implementation |
Composite |
Library |
System.Performance.Library |