Microsoft.Windows.WmiProviderWithRelationshipSnapshotDataMapper

System Center

Updated: August 10, 2011

Applies To: Operations Manager 2007 R2

The Microsoft.Windows.WmiProviderWithRelationshipSnapshotDataMapper module is a data source module type that queries Windows Management Instrumentation (WMI) for object data at a scheduled, recurring interval and returns the discovered relationship type instance as System.Discovery.Data type data.

Usage

Use this module only when you are creating a discovery workflow and want to discover relationship type instances. For more information about Discoveries in management packs, see Discovery. For more information about relationship types, see RelationshipType.

Type Definition


<DataSourceModuleType ID="Microsoft.Windows.WmiProviderWithRelationshipSnapshotDataMapper" 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="RelationshipId" type="xsd:string" />
    <xsd:element name="SourceTypeId" minOccurs="0" maxOccurs="1" type="xsd:string" />
    <xsd:element name="TargetTypeId" minOccurs="0" maxOccurs="1" type="xsd:string" />
    <xsd:element name="SourceRoleSettings" type="SettingsType" />
    <xsd:element name="TargetRoleSettings" type="SettingsType" />
    <xsd:element name="InstanceSettings" minOccurs="0" maxOccurs="1" type="SettingsType" />
  </Configuration>
  <OverrideableParameters>
    <OverrideableParameter ID="Frequency" Selector="$Config/Frequency$" ParameterType="int" />
  </OverrideableParameters>
  <ModuleImplementation>
    <Composite>
      <MemberModules>
        <DataSource TypeID="System!System.Discovery.Scheduler" ID="Scheduler">
          <Scheduler>
            <SimpleReccuringSchedule>
              <Interval Unit="Seconds">$Config/Frequency$</Interval>
            </SimpleReccuringSchedule>
            <ExcludeDates />
          </Scheduler>
        </DataSource>
        <ProbeAction TypeID="Microsoft.Windows.WmiProbe" ID="Probe">
          <NameSpace>$Config/NameSpace$</NameSpace>
          <Query>$Config/Query$</Query>
        </ProbeAction>
        <ConditionDetection ID="Mapper" TypeID="System!System.Discovery.RelationshipSnapshotDataMapper">
          <RelationshipId>$Config/RelationshipId$</RelationshipId>
          <SourceTypeId>$Config/SourceTypeId$</SourceTypeId>
          <TargetTypeId>$Config/TargetTypeId$</TargetTypeId>
          <SourceRoleSettings>$Config/SourceRoleSettings$</SourceRoleSettings>
          <TargetRoleSettings>$Config/TargetRoleSettings$</TargetRoleSettings>
          <InstanceSettings>$Config/InstanceSettings$</InstanceSettings>
        </ConditionDetection>
      </MemberModules>
      <Composition>
        <Node ID="Mapper">
          <Node ID="Probe">
            <Node ID="Scheduler" />
          </Node>
        </Node>
      </Composition>
    </Composite>
  </ModuleImplementation>
  <OutputType>System!System.Discovery.Data</OutputType>
</DataSourceModuleType>

Parameters

The Microsoft.Windows.WmiProviderWithRelationshipSnapshotDataMapper module supports the configuration parameters described in the following table.

 

Parameter Type Overrideable Description

Namespace

String

False

Required parameter. Specifies the WMI namespace within which the module is to run the query.

Query

String

False

Required parameter. Specifies the SELECT WMI query to run.

Frequency

Unsigned Integer

True

Required parameter. Specifies the frequency in seconds at which to run the WMI.

RelationshipId

GUID

False

Required parameter. Specifies the ID of the relationship type into which the WMI object is to be mapped.

SourceTypeId

GUID

False

Optional parameter. Specifies the ID of the Source class type in the relationship type into which the WMI object is to be mapped.

TargetTypeId

GUID

False

Optional parameter. Specifies the ID of the Target class type in the relationship type into which the WMI object is to be mapped.

SourceRoleSettings

SettingsType

False

Optional parameter. Defines all property values for the source class type instance in the relationship.

TargetRoleSettings

SettingsType

False

Optional parameter. Defines all property values for the target class type instance in the relationship.

InstanceSettings

SettingsType

False

Required. Defines all property values of the discovered relationship type instances.

For more information about the Namespace and Query parameters, see the Microsoft.Windows.WmiProbe module.

The RelationshipId, SourceTypeId, and TargetTypeId parameters must always be in the following format: $MPElement[Name=”TypeID”]$. For more information about the $MPElement variable notation, see $MPElement.

Composition

The Microsoft.Windows.WmiProvider.WmiProviderWithRelationshipSnapshotDataMapper module is a composite module that contains the member modules described in the following table.

 

Workflow Run Order Module Type Usage

System.Discovery.Scheduler

Outputs System.Discovery.Data data on a scheduled, repeating interval. Used only in discovery data source module types.

1

Microsoft.Windows.WmiProbe

Returns the queried WMI object data as System.PropertyBagData and passes it on to the subsequent mapping module.

2

System.Discovery.ClassSnapShotDataMapper

Maps the received System.PropertyBagData data into relationship type data as System.Discovery.Data.

Related Modules

 

Module Type Usage

Microsoft.Windows.Discovery.WMISinglePropertyProvider2

Queries WMI for object and single property data at a scheduled, recurring interval and returns the results as System.Discovery.Data type data.

Microsoft.Windows.WmiProviderWithClassSnapshotDataMapper

Queries WMI for object data at a scheduled, recurring interval and returns the discovered class type instance as System.Discovery.Data type.

External Module References

None.

Sample

The following XML sample illustrates how you can use Windows.WmiProviderWithRelationshipSnapshotDataMapper in a discovery. Both the target and source of the relationship are assigned their own settings.


<Discovery ID="WmiProbe.ComputerContainsLogicalDisk.Discovery" Enabled="false" Target="Windows!Microsoft.Windows.Computer">
<Category>Discovery</Category>
 <DiscoveryTypes>
  <DiscoveryRelationship TypeID="WmiProbe.ComputerContainsLogicalDisk" />
</DiscoveryTypes>
 <DataSource ID="DiscoveryDataSource" TypeID="Windows!Microsoft.Windows.WmiProviderWithRelationshipSnapshotDataMapper">
  <NameSpace>root\cimv2</NameSpace>
  <Query>select DeviceID from Win32_LogicalDisk</Query>
  <Frequency>60</Frequency>
  <RelationshipId>$MPElement[Name="WmiProbe.ComputerContainsLogicalDisk"]$</RelationshipId>
   <SourceRoleSettings>
     <Settings>
      <Setting>
        <Name>$MPElement[Name="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Name>
        <Value>$Target/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Value>
      </Setting>
    </Settings>
  </SourceRoleSettings>
   <TargetRoleSettings>
    <Settings>
      <Setting>
        <Name>$MPElement[Name="WmiProbe.LogicalDisk"]/DeviceID$</Name>
        <Value>$Data/Property[@Name='DeviceID']$</Value>
      </Setting>
    </Settings>
  </TargetRoleSettings>
</DataSource>
</Discovery>

Information

 

   

Module Type

DataSourceModuleType

Input Type

None

Output Type

System.Discovery.Data

Implementation

Composite

Library

Microsoft.Windows.Library

 
Show: