System.NetworkManagement.ExpressionFilter

Applies To: System Center 2012 - Operations Manager, System Center 2012 R2 Operations Manager, System Center 2012 SP1 - Operations Manager

The System.NetworkManagement.ExpressionFilter condition detection module is a filtering module that takes any input data type and outputs the same data type. There are no changes to the data item flowing through a module of this type. The module either allows the data item through or stops the data item based on the expression specified as configuration, and the defined suppression settings.

Usage

Use this module within a workflow to filter any type of data. The suppression settings can be used to specify that workflow does not continue unless a specified number of matches occurs within a given sample count.

Type Definition

      <ConditionDetectionModuleType ID="System.NetworkManagement.ExpressionFilter" Accessibility="Public" Batching="true" Stateful="false" PassThrough="true">
  <Configuration>
    <IncludeSchemaTypes>
      <SchemaType>System.ExpressionEvaluatorSchema</SchemaType>
    </IncludeSchemaTypes>
    <xsd:element name="Expression" type="ExpressionType" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element name="SuppressionSettings" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element name="MatchCount" type="xsd:unsignedByte" />
          <xsd:element name="SampleCount" type="xsd:unsignedByte" />
        </xsd:sequence>
      </xsd:complexType>
    </xsd:element>
  </Configuration>
  <OverrideableParameters>
    <OverrideableParameter ID="MatchCount" Selector="$Config/SuppressionSettings/MatchCount$" ParameterType="int" />
    <OverrideableParameter ID="SampleCount" Selector="$Config/SuppressionSettings/SampleCount$" ParameterType="int" />
  </OverrideableParameters>
  <ModuleImplementation Isolation="Any">
    <Native>
      <ClassID>C6410789-C1BB-4AF1-B818-D01A5367781D</ClassID>
    </Native>
  </ModuleImplementation>
  <OutputType>System!System.BaseData</OutputType>
  <InputTypes>
    <InputType>System!System.BaseData</InputType>
  </InputTypes>
</ConditionDetectionModuleType>

Parameters

The System.ExpressionFilter module supports the following configuration parameters:

Parameter Type Overrideable Description

Expression

ExpressionType

True

Required parameter. Defines an expression that evaluates to true or false.

SuppressionSettings

Complex type

True

Optional parameter. Indicates whether multiple matches are required before a data item is output.

If the expression defined in the Expression parameter evaluates to true, and if the suppression settings do not take effect, the workflow will continue and the data will be passed on to the subsequent module in the workflow. If false, then the data will not be passed to the next module and the workflow will end. For more information on the ExpressionType data type, see ExpressionType.

The SuppressionSettings parameter allows some expression matches to be suppressed, depending on how many times they occur. This parameter is a complex type that consists of two elements:

Element Type Overridable Description

MatchCount

Integer

False

Required element. Indicates how many positive matches the expression filter requires before outputting a data item. A value of 1 or 0 here defaults to the original behavior of the Expression Filter which is to output on all matches.

SampleCount

Integer

False

Optional element. Indicates how many total samples (both positive and negative) to store while calculating matches. This value must be greater or equal to the match count. If it is not, or if it is missing, the sample count is set equal to the match count (that is, only consecutive matching samples will trigger output).

Composition

The System.NetworkManagement.ExpressionFilter module is a native module.

Module Type Usage

System.ExpressionFilter

Filtering module with suppression settings.

System.ExpressionFilter.EventSuppression

Filtering module with suppression settings specific to a time period.

System.ExpressionFilter.IntervalSuppression

Filtering module with suppression settings specific to number of matches.

External Module References

Module Type Usage

System.NetworkManagement.ICMPPingTime

Internal module for Microsoft use only.

System.NetworkManagement.MemoryPerfProvider

Data source module that retrieves memory performance information from SNMP nodes.

Sample

The following XML example shows how a unit monitor uses a pair of System.NetworkManagement.ExpressionFilter modules to determine whether a returned value is greater or less than a configured threshold. Note that the expression is a complex type, but the suppression parameters are configurable. Note that the MatchCount and SampleCount parameters are the same, meaning that only consecutive matching samples will trigger output.

<UnitMonitorType ID="System.NetworkManagement.ComputedLowThresholdMonitorType" Accessibility="Internal">
  <MonitorTypeStates>
    <MonitorTypeState ID="MTSThresholdSuccess" NoDetection="false" />
    <MonitorTypeState ID="MTSThresholdError" NoDetection="false" />
  </MonitorTypeStates>
  <Configuration>
    <IncludeSchemaTypes>
      <SchemaType>System.ExpressionEvaluatorSchema</SchemaType>
    </IncludeSchemaTypes>
    <xsd:element minOccurs="1" name="Interval" type="xsd:integer" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element minOccurs="0" maxOccurs="1" name="NoOfRetries" type="xsd:unsignedInt" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element minOccurs="0" maxOccurs="1" name="Timeout" type="xsd:unsignedInt" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element minOccurs="1" name="SnmpVarBinds" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element minOccurs="1" maxOccurs="unbounded" name="SnmpVarBind">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="OID" type="xsd:string" />
                <xsd:element name="Syntax" type="xsd:integer" />
                <xsd:element name="Value">
                  <xsd:complexType>
                    <xsd:simpleContent>
                      <xsd:extension base="xsd:string">
                        <xsd:attribute name="VariantType" type="xsd:integer" use="optional" />
                      </xsd:extension>
                    </xsd:simpleContent>
                  </xsd:complexType>
                </xsd:element>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
        </xsd:sequence>
      </xsd:complexType>
    </xsd:element>
    <xsd:element minOccurs="1" name="ComputedPerformanceValue" type="NumericValueExpressionType" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element minOccurs="1" name="Threshold" type="xsd:integer" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element minOccurs="1" name="NumberOfSamples" type="xsd:integer" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element minOccurs="1" name="ObjectName" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element minOccurs="1" name="CounterName" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
  </Configuration>
  <OverrideableParameters>
    <OverrideableParameter ID="Interval" Selector="$Config/Interval$" ParameterType="int" />
    <OverrideableParameter ID="NoOfRetries" Selector="$Config/NoOfRetries$" ParameterType="int" />
    <OverrideableParameter ID="Timeout" Selector="$Config/Timeout$" ParameterType="int" />
    <OverrideableParameter ID="Threshold" Selector="$Config/Threshold$" ParameterType="int" />
    <OverrideableParameter ID="NumberOfSamples" Selector="$Config/NumberOfSamples$" ParameterType="int" />
  </OverrideableParameters>
  <MonitorImplementation>
    <MemberModules>
      <DataSource ID="ProbeDS" TypeID="System.NetworkManagement.Host.ExtendedSnmpQueryProvider">
        <Interval>$Config/Interval$</Interval>
        <NoOfRetries>$Config/NoOfRetries$</NoOfRetries>
        <Timeout>$Config/Timeout$</Timeout>
        <SnmpVarBinds>$Config/SnmpVarBinds$</SnmpVarBinds>
      </DataSource>
      <ConditionDetection ID="ComputePerfValue" TypeID="System.NetworkManagement.Computation">
        <NumericValue>$Config/ComputedPerformanceValue$</NumericValue>
      </ConditionDetection>
      <ConditionDetection ID="PerfMapper" TypeID="Performance!System.Performance.DataGenericMapper">
        <ObjectName>$Config/ObjectName$</ObjectName>
        <CounterName>$Config/CounterName$</CounterName>
        <InstanceName />
        <Value>$Data/Value$</Value>
      </ConditionDetection>
      <ConditionDetection ID="OperationStatusSuccess" TypeID="System.NetworkManagement.ExpressionFilter">
        <Expression>
          <SimpleExpression>
            <ValueExpression>
              <XPathQuery Type="Double">Value</XPathQuery>
            </ValueExpression>
            <Operator>Greater</Operator>
            <ValueExpression>
              <Value Type="Double">$Config/Threshold$</Value>
            </ValueExpression>
          </SimpleExpression>
        </Expression>
        <SuppressionSettings>
          <MatchCount>$Config/NumberOfSamples$</MatchCount>
          <SampleCount>$Config/NumberOfSamples$</SampleCount>
        </SuppressionSettings>
      </ConditionDetection>
      <ConditionDetection ID="OperationStatusError" TypeID="System.NetworkManagement.ExpressionFilter">
        <Expression>
          <SimpleExpression>
            <ValueExpression>
              <XPathQuery Type="Double">Value</XPathQuery>
            </ValueExpression>
            <Operator>LessEqual</Operator>
            <ValueExpression>
              <Value Type="Double">$Config/Threshold$</Value>
            </ValueExpression>
          </SimpleExpression>
        </Expression>
        <SuppressionSettings>
          <MatchCount>$Config/NumberOfSamples$</MatchCount>
          <SampleCount>$Config/NumberOfSamples$</SampleCount>
        </SuppressionSettings>
      </ConditionDetection>
    </MemberModules>
    <RegularDetections>
      <RegularDetection MonitorTypeStateID="MTSThresholdSuccess">
        <Node ID="OperationStatusSuccess">
          <Node ID="PerfMapper">
            <Node ID="ComputePerfValue">
              <Node ID="ProbeDS" />
            </Node>
          </Node>
        </Node>
      </RegularDetection>
      <RegularDetection MonitorTypeStateID="MTSThresholdError">
        <Node ID="OperationStatusError">
          <Node ID="PerfMapper">
            <Node ID="ComputePerfValue">
              <Node ID="ProbeDS" />
            </Node>
          </Node>
        </Node>
      </RegularDetection>
    </RegularDetections>
  </MonitorImplementation>
</UnitMonitorType>

In this second example, System.NetworkManagement.ExpressionFilter is used only for its suppression settings. There is no expression at all; the rule must receive three valid responses in three tries to record the performance data.

<Rule ID="System.NetworkManagement.DeltaRule.ifMIB.NetworkAdapter.ifInBitsRate" Enabled="false" Target="NetworkLibrary!System.NetworkManagement.ifMIB_Base_NetworkAdapter" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100">
  <Category>PerformanceCollection</Category>
  <DataSources>
    <DataSource ID="DS" TypeID="System.NetworkManagement.SnmpPerformanceProvider.Rate">
      <Interval>300</Interval>
      <NoOfRetries>3</NoOfRetries>
      <Timeout>3500</Timeout>
      <OID>.1.3.6.1.2.1.31.1.1.1.6.$Target/Property[Type="NetworkLibrary!System.NetworkManagement.NetworkAdapter"]/Index$</OID>
      <ObjectName>Interface</ObjectName>
      <CounterName>Inbound Bits/sec</CounterName>
      <UnitFactor>8</UnitFactor>
    </DataSource>
  </DataSources>
  <ConditionDetection ID="CollectionFilter" TypeID="System.NetworkManagement.ExpressionFilter">
    <Expression />
    <SuppressionSettings>
      <MatchCount>3</MatchCount>
      <SampleCount>3</SampleCount>
    </SuppressionSettings>
  </ConditionDetection>
  <WriteActions>
    <WriteAction ID="WriteToDB" TypeID="SystemCenter!Microsoft.SystemCenter.CollectPerformanceData" />
    <WriteAction ID="WriteToDW" TypeID="SCDW!Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData" />
  </WriteActions>
</Rule>

Information

   

Module Type

ConditionDetectionModuleType

Input Type

System.BaseData

Output Type

System.BaseData

Implementation

Native

Library

System.NetworkManagement.Monitoring