Microsoft.Windows.WmiEventProvider.EventProvider

Applies To: Operations Manager 2007 R2

The Microsoft.Windows.WmiEventProvider.EventProvider module is a data source module type that issues an event-related query to a Windows Management Instrumentation (WMI) namespace at a polling interval and returns the results as System.Event.Data type data.

Usage

Use this module to define an event-related WMI query that will subscribe to a particular event-publishing WMI class. This module will continue to receive notifications at the specified interval as WMI events occur.

Type Definition

<DataSourceModuleType ID="Microsoft.Windows.WmiEventProvider.EventProvider" Accessibility="Public">
  <Configuration>
    <xsd:element name="NameSpace" type="xsd:string" />
    <xsd:element name="Query" type="xsd:string" />
    <xsd:element name="PollInterval" type="xsd:integer" />
  </Configuration>
  <ModuleImplementation>
    <Composite>
      <MemberModules>
        <DataSource TypeID="Microsoft.Windows.WmiEventProvider" ID="DataSource">
          <NameSpace>$Config/NameSpace$</NameSpace>
          <Query>$Config/Query$</Query>
          <PollInterval>$Config/PollInterval$</PollInterval>
        </DataSource>
        <ConditionDetection TypeID="System!System.Event.GenericDataMapper" ID="Mapper">
          <EventOriginId>$Target/Id$</EventOriginId>
          <PublisherId>$MPElement$</PublisherId>
          <PublisherName>WmiEventProvider</PublisherName>
          <Channel>WmiEventProvider</Channel>
          <LoggingComputer />
          <EventNumber>0</EventNumber>
          <EventCategory>3</EventCategory>
          <EventLevel>0</EventLevel>
          <UserName />
          <Params />
        </ConditionDetection>
      </MemberModules>
      <Composition>
        <Node ID="Mapper">
          <Node ID="DataSource" />
        </Node>
      </Composition>
    </Composite>
  </ModuleImplementation>
  <OutputType>System!System.Event.Data</OutputType>
</DataSourceModuleType>

Parameters

The Microsoft.Windows.WmiEventProvider.EventProvider 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.

PollInterval

Integer

False

Required parameter. Specifies, in seconds, the polling interval at which to query for events. Must be greater than 0.

For information about the Namespace parameter, see Microsoft.Windows.WmiProbe.

For information about the Query parameter, see Microsoft.Windows.WmiEventProvider.

Important

The PollingInterval value should always be the same as the value in the WITHIN clause of your query.

Composition

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

Workflow Run Order Module Type Usage

1

Microsoft.Windows.WmiEventProvider

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

2

System.Event.GenericDataMapper

Maps the incoming System.PropertyBagData data to System.Event.Data data.

None.

External Module References

None.

Sample

The following XML sample illustrates how you can poll for event data by using the Microsoft.Windows.WmiEventProvider.EventProvider module.

<Rule ID="EventPollingRule" Enabled="true" Target="Microsoft.Demo.Discovery.AppY" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100">
  <Category>Custom</Category>
   <DataSources>
     <DataSource ID="WMIDS" TypeID="Windows!Microsoft.Windows.WmiEventProvider.EventProvider">
      <NameSpace>root\cimv2</NameSpace>
      <Query>select * FROM __instancecreationevent WITHIN 30 WHERE TargetInstance ISA "win32_process"</Query>
      <PollInterval>30</PollInterval>
    </DataSource>
  </DataSources>
   <WriteActions>
    <WriteAction ID="WriteToDB" TypeID="SC!Microsoft.SystemCenter.CollectEvent" />
    <WriteAction ID="WriteToDW" TypeID="SCDW!Microsoft.SystemCenter.DataWarehouse.PublishEventData" />
  </WriteActions>
</Rule>

Information

   

Module Type

DataSourceModuleType

Input Type

None

Output Type

System.Event.Data

Implementation

Native

Library

Microsoft.Windows.Library