Share via


Microsoft.SystemCenter.CollectEvent

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

The Microsoft.SystemCenter.CollectEvent write action module type takes System.Event.Data data as input and writes the event to the Operations Manager database.

Usage

This module is commonly used by any rule that stores incoming event data in the Operations Manager database. It is often used together with the Microsoft.SystemCenter.DataWarehouse.PublishEventData write action module to store the data in the System Center data warehouse.

Type Definition

<WriteActionModuleType ID="Microsoft.SystemCenter.CollectEvent" Accessibility="Public" Batching="false">
  <Configuration />
  <ModuleImplementation Isolation="Any">
    <Composite>
      <MemberModules>
        <ConditionDetection ID="Mapper" TypeID="Microsoft.SystemCenter.Event.LinkedDataMapper">
          <ManagedEntityId>$Target/Id$</ManagedEntityId>
          <RuleId>$MPElement$</RuleId>
        </ConditionDetection>
        <WriteAction ID="WA" TypeID="System!System.PublishData">
          <ManagementGroupId>$Target/ManagementGroup/Id$</ManagementGroupId>
          <ChannelId>B6593AC8-EDC5-47ba-B0E0-EEE7D9DEB9AA</ChannelId>
        </WriteAction>
      </MemberModules>
      <Composition>
        <Node ID="WA">
          <Node ID="Mapper" />
        </Node>
      </Composition>
    </Composite>
  </ModuleImplementation>
  <InputType>System!System.Event.Data</InputType>
</WriteActionModuleType>

Parameters

The Microsoft.SystemCenter.CollectEvent module takes no configuration parameters.

Composition

The Microsoft.SystemCenter.CollectEvent module is a composite module that contains the member modules described in the following table.

Workflow Run Order Module Type Usage

1

Microsoft.SystemCenter.Event.LinkedDataMapper

Links the event data to the target ID.

2

System.PublishData

Writes the data to the Operations Manager database.

Module Type Usage

Microsoft.SystemCenter.DataWarehouse.PublishEventData

Writes event data to the data warehouse.

Microsoft.SystemCenter.DataWarehouse.PublishPerformanceData

Writes performance data to the System Center Data Warehouse database.

Microsoft.SystemCenter.CollectPerformanceData

Writes performance data to the Operations Manager database.

External Module References

None.

Sample

The following code example is a rule that collects an event from the Windows event log and writes it to both the Operations Manager database and the System Center data warehouse:

<Rule ID="Microsoft.Samples.Collect101" Target="Microsoft.Samples.ApplicationX" Enabled="true">
  <Category>AvailabilityHealth</Category>
  <DataSources>
    <DataSource ID="DS" TypeID="Windows!Microsoft.Windows.EventProvider">
      <ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
      <LogName>Application</LogName>
      <Expression>
        <And>
          <Expression>
            <SimpleExpression>
              <ValueExpression>
                <XPathQuery Type="String">PublisherName</XPathQuery>
              </ValueExpression>
              <Operator>Equal</Operator>
              <ValueExpression>
                <Value Type="String">EventCreate</Value>
              </ValueExpression>
            </SimpleExpression>
          </Expression>
          <Expression>
            <SimpleExpression>
              <ValueExpression>
                <XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
              </ValueExpression>
              <Operator>Equal</Operator>
              <ValueExpression>
                <Value Type="UnsignedInteger">101</Value>
              </ValueExpression>
            </SimpleExpression>
          </Expression>
        </And>
      </Expression>
    </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

WriteActionModuleType

Input Type

System.Event.Data

Output Type

None.

Implementation

Composite

Library

Microsoft.SystemCenter.Library