Share via


ConditionDetection (DataSourceModuleType)

Applies To: Operations Manager 2007 R2, System Center Operations Manager 2007

Represents an implementation of a condition detection module type definition.

Schema Hierarchy

ManagementPack
  TypeDefinitions
    ModuleTypes
      DataSourceModuleType
        ModuleImplementation (DataSourceModuleType)
          Composite (DataSourceModuleType)
            MemberModules (DataSourceModuleType)
              ConditionDetection (DataSourceModuleType)

Syntax

<ConditionDetection ID=”ModuleID” Comment=”Comment” TypeID=”ModuleTypeID”>
Custom Schema Defined Parameters
</ConditionDetection>

Attributes and Elements

The following sections describe attributes, child elements, and the parent element of the ConditionDetection element.

Attributes

Attribute Description

ID

Required attribute. Represents the identity of the element.

Comment

Optional attribute. Represents commentary by the management pack author.

TypeID

Required attribute. Represents the ConditionDetection module type definition from which this ConditionDetection module inherits its configuration schema.

ID Attribute Values

Value Description

The format for the ID attribute should be UniqueElementID.

The ID string must contain the following characteristics:

  • The length is less than 255 characters.

  • The ID begins with a letter (a-z) or a number (0-9).

  • The ID contains only letters, numbers, the period character (.), or the underscore (_) character.

  • The ID is unique across all elements within the scope of the ConditionDetection module’s containing workflow.

  • The ID is case-sensitive.

Child Elements

The child element of the ConditionDetection module is defined by the Configuration (ConditionDetectionModuleType) schema of its base type as referenced in the TypeID attribute.

Parent Elements

Element Description

MemberModules (DataSourceModuleType)

Contains all of the modules that are used in the linear workflow of a module type definition.

Remarks

A condition detection module takes any number of input streams and outputs data based on some kind of filtering of data. Condition detection modules are also used to convert one data type to another data type in a workflow. Because condition detection modules can take multiple data input streams, they are also used to correlate or consolidate data within a workflow. The data types of its input and output data are defined in its InputTypes and OutputType (ConditionDetectionModuleType) elements, respectively.

A condition detection module type never alters system state. If you want your module to affect system state, you must instead use or implement a WriteAction (WriteActionModuleType) module.

Typically, to filter for specific events, a condition detection module type is preceded in a workflow by a DataSource (DataSourceModuleType) event module. Condition detection modules are also often preceded by DataSource (DataSourceModuleType) modules that provide data for filtering purposes.

Because a filtering condition detection module is not itself a data source, it always returns the same OutputType element of the preceding module in the workflow, whether that be a DataSource or ProbeAction module. If you want to change the format of the output data, you must use some kind of condition detection mapping module.

A condition detection module’s base type must always be a descendant of a ConditionDetectionModuleType type.

Example

The following sample shows a DataSourceModuleType that uses a condition detection module to convert the System.PropertyBagData type outputted by Microsoft.Windows.WmiProvider into the System.Discovery.Data type.

<DataSourceModuleType ID="Microsoft.Windows.Discovery.WMISinglePropertyProvider2" Accessibility="Public">
  <Configuration>
    <IncludeSchemaTypes>
      <SchemaType>System!System.Discovery.MapperSchema</SchemaType>
    </IncludeSchemaTypes>
    <xsd:element name="NameSpace" type="xsd:string" />
    <xsd:element name="Query" type="xsd:string" />
    <xsd:element name="Frequency" type="xsd:unsignedInt" />
    <xsd:element name="ClassID" type="xsd:string" />
    <xsd:element name="PropertyName" type="xsd:string" />
    <xsd:element name="InstanceSettings" type="SettingsType" />
  </Configuration>
  <OverrideableParameters>
    <OverrideableParameter ID="Frequency" Selector="$Config/Frequency$" ParameterType="int" />
  </OverrideableParameters>
  <ModuleImplementation>
    <Composite>
      <MemberModules>
        <DataSource ID="DS" TypeID="Microsoft.Windows.WmiProvider">
          <NameSpace>$Config/NameSpace$</NameSpace>
          <Query>$Config/Query$</Query>
          <Frequency>$Config/Frequency$</Frequency>
        </DataSource>
        <ConditionDetection ID="Mapping" TypeID="System!System.Discovery.ClassSnapshotDataMapper">
          <ClassId>$Config/ClassID$</ClassId>
          <InstanceSettings>$Config/InstanceSettings$</InstanceSettings>
        </ConditionDetection>
      </MemberModules>
      <Composition>
        <Node ID="Mapping">
          <Node ID="DS" />
        </Node>
      </Composition>
    </Composite>
  </ModuleImplementation>
  <OutputType>System!System.Discovery.Data</OutputType>
</DataSourceModuleType>

The next sample illustrates how a condition detection module can be used to filter input data. The DataSource module named DS returns System.Performance.Data at a specified frequency. The condition detection module filters that performance data that is based on the value in the Expression configuration parameter. The output type of the condition detection module is the same as the output data of its preceding data source module, DS. If the filtering returns any results, the DataSourceModuleType element will return System.Performance.Data as output. If the filter returns zero results, the workflow ends and nothing is returned.

<DataSourceModuleType ID="Microsoft.Exchange2007.Performance.FilteredDataProvider" Accessibility="Public" Batching="false">
  <Configuration>
    <IncludeSchemaTypes>
      <SchemaType>System!System.ExpressionEvaluatorSchema</SchemaType>
    </IncludeSchemaTypes>
    <xsd:element minOccurs="0" maxOccurs="1" name="ComputerName" type="xsd:string" />
    <xsd:element minOccurs="1" name="CounterName" type="xsd:string" />
    <xsd:element minOccurs="1" name="ObjectName" type="xsd:string" />
    <xsd:element minOccurs="0" maxOccurs="1" name="InstanceName" type="xsd:string" />
    <xsd:element minOccurs="0" maxOccurs="1" name="AllInstances" type="xsd:boolean" />
    <xsd:element minOccurs="1" name="Frequency" type="xsd:unsignedInt" />
    <xsd:element minOccurs="1" name="Expression" type="ExpressionType" />
  </Configuration>
  <OverrideableParameters>
    <OverrideableParameter ID="Frequency" Selector="$Config/Frequency$" ParameterType="int" />
  </OverrideableParameters>
  <ModuleImplementation Isolation="Any">
    <Composite>
      <MemberModules>
        <DataSource ID="DS" TypeID="Performance!System.Performance.DataProvider">
          <ComputerName>$Config/ComputerName$</ComputerName>
          <CounterName>$Config/CounterName$</CounterName>
          <ObjectName>$Config/ObjectName$</ObjectName>
          <InstanceName>$Config/InstanceName$</InstanceName>
          <AllInstances>$Config/AllInstances$</AllInstances>
          <Frequency>$Config/Frequency$</Frequency>
        </DataSource>
        <ConditionDetection ID="CD" TypeID="System!System.ExpressionFilter">
          <Expression>$Config/Expression$</Expression>
        </ConditionDetection>
      </MemberModules>
      <Composition>
        <Node ID="CD">
          <Node ID="DS" />
        </Node>
      </Composition>
    </Composite>
  </ModuleImplementation>
  <OutputType>Performance!System.Performance.Data</OutputType>
</DataSourceModuleType>

See Also

Reference

ConditionDetectionModuleType
MemberModules (DataSourceModuleType)