Share via


System.NetworkManagement.SnmpTrapEventProvider

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

The System.NetworkManagement.SnmpTrapEventProvider data source module type is used to return SNMP traps as a device-specific System.Event.Data data type.

Usage

Use this module to receive successful SNMP trap events and convert them into event data. This module can be implemented in a rule or monitor where the data can be collected and stored in the database and/or data warehouse or trigger alert and state changes.

Type Definition

<DataSourceModuleType ID="System.NetworkManagement.SnmpTrapEventProvider" Accessibility="Public" Batching="false">
  <Configuration>
    <IncludeSchemaTypes>
      <SchemaType>System!System.ParamListSchema</SchemaType>
    </IncludeSchemaTypes>
    <xsd:element minOccurs="1" maxOccurs="1" name="IP" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element minOccurs="0" maxOccurs="1" name="Version" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element minOccurs="0" maxOccurs="1" name="OIDProps" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element minOccurs="0" maxOccurs="unbounded" name="OIDProp" type="xsd:string" />
        </xsd:sequence>
      </xsd:complexType>
    </xsd:element>
    <xsd:element name="EventOriginId" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element name="PublisherId" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element name="PublisherName" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element name="Channel" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element name="LoggingComputer" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element name="EventNumber" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element name="EventCategory" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element name="EventLevel" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element name="UserName" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element name="Description" type="xsd:string" minOccurs="0" maxOccurs="1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element name="Params" type="ParamListType" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
  </Configuration>
  <ModuleImplementation Isolation="Any">
    <Composite>
      <MemberModules>
        <DataSource ID="DSTrap" TypeID="System.NetworkManagement.SnmpTrapProvider">
          <IP>$Config/IP$</IP>
          <CommunityString>$RunAs[Name="System.NetworkManagement.Snmp.MonitoringAccount"]/CommunityString$</CommunityString>
          <Version>$Config/Version$</Version>
          <OIDProps>$Config/OIDProps$</OIDProps>
        </DataSource>
        <ConditionDetection ID="EventFilter" TypeID="System!System.ExpressionFilter">
          <Expression>
            <SimpleExpression>
              <ValueExpression>
                <XPathQuery Type="String">ErrorCode</XPathQuery>
              </ValueExpression>
              <Operator>Equal</Operator>
              <ValueExpression>
                <Value Type="UnsignedInteger">1</Value>
              </ValueExpression>
            </SimpleExpression>
          </Expression>
        </ConditionDetection>
        <ConditionDetection ID="Mapper" TypeID="System!System.Event.GenericDataMapper">
          <EventOriginId>$Target/Id$</EventOriginId>
          <PublisherId>$MPElement$</PublisherId>
          <PublisherName>$Config/PublisherName$</PublisherName>
          <Channel>$Config/Channel$</Channel>
          <LoggingComputer>$Config/LoggingComputer$</LoggingComputer>
          <EventNumber>$Config/EventNumber$</EventNumber>
          <EventCategory>$Config/EventCategory$</EventCategory>
          <EventLevel>$Config/EventLevel$</EventLevel>
          <UserName>$Config/UserName$</UserName>
          <Description>$Config/Description$</Description>
          <Params>$Config/Params$</Params>
        </ConditionDetection>
      </MemberModules>
      <Composition>
        <Node ID="Mapper">
          <Node ID="EventFilter">
            <Node ID="DSTrap" />
          </Node>
        </Node>
      </Composition>
    </Composite>
  </ModuleImplementation>
  <OutputType>System!System.Event.Data</OutputType>
</DataSourceModuleType>

Parameters

The System.NetworkManagement.SnmpTrapEventProvider module supports the following configuration parameters:

Parameter Type Overrideable Description

IP

String

False

Required parameter. Specifies the IP address of the SNMP managed entity

Version

String

False

Optional parameter. Specifies the SNMP version. Valid values are 1, 2, and 3.

OIDProps

Complex type

False

Optional parameter. Contains a list of OIDs to register for traps

EventOriginId

String

False

Required parameter. Identifies the source of the event by a GUID. The value of this parameter is commonly set to a $Target/Id$ variable that contains a GUID that represents the ID of the object that the rule that is running against.

PublisherId

String

False

Identifies the event publisher by a GUID. This parameter is commonly set to a $Target/Id$ variable that contains a GUID that represents the ID of the object that the rule is running against.

PublisherName

String

False

Contains the event source.

Channel

String

False

Contains the name of the event log

LoggingComputer

String

False

Contains the name of the computer the event was logged from.

EventNumber

String

False

Contains the event ID.

EventCategory

String

False

Contains the category of the event that is used to help correlate events to the components of an application.

EventLevel

String

False

Contains the numeric severity level of the event (for example, 4 for Information, 2 for Warning, or 1 for Error).

UserName

String

False

Contains the user name of the user that generated the event.

Description

String

False

Contains a text description of the event.

Params

ParamListType

False

Optional. Specifies one of more event parameters.

OIDProps contains a list of at least one OIDProp element. Each OIDProp element represents an OID that traps from the targeted device will contain. For example:

<OIDProps>
   <OIDProp>1.3.6.1.2.1.4.1.0</OIDProp>
</OIDProps>

Composition

The System.NetworkManagement.SnmpTrapEventProvider module is a composite module that contains the member modules described in the following table.

Workflow Run Order Module Type Usage

1

System.NetworkManagement.SnmpTrapProvider

Provides SNMP traps from the specified SNMP entity.

System.ExpressionFilter

Checks whether the data source returned an error code.

System.Event.GenericDataMapper

Maps the SNMP data to System.Event.Datatype data.

Module Type Usage

System.NetworkManagement.TrapTriggerProvider

Used to return SNMP traps as a device-specific System.Event.Data data type.

External Module References

Module Type Usage

System.NetworkManagement.TrapTriggerProvider

Provides SNMP data used to trigger a rule based on the OID.

Sample

The following XML example shows how System.NetworkManagement.SnmpTrapEventProvider is used in this rule to collect instances of the cold start trap from any SNMP device. The OID for a cold start trap is known and common across many devices.

<Rule ID="System.NetworkManagement.Generic.Node.ColdStart" Enabled="true" Target="NetworkLibrary!System.NetworkManagement.Node" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100">
  <Category>EventCollection</Category>
  <DataSources>
    <DataSource ID="DS" TypeID="NetworkLibrary!System.NetworkManagement.SnmpTrapEventProvider">
      <IP>$Target/Property[Type="NetworkLibrary!System.NetworkManagement.Node"]/SNMPAddress$</IP>
      <OIDProps>
        <OIDProp>.1.3.6.1.6.3.1.1.5.1</OIDProp>
      </OIDProps>
      <EventOriginId>$Target/Id$</EventOriginId>
      <PublisherId>$Target/Id$</PublisherId>
      <PublisherName>Snmp Event</PublisherName>
      <Channel>SnmpEvent</Channel>
      <LoggingComputer />
      <EventNumber>1601</EventNumber>
      <EventCategory>5</EventCategory>
      <EventLevel>10</EventLevel>
      <UserName />
      <Params />
    </DataSource>
  </DataSources>
  <WriteActions>
    <WriteAction ID="WriteToDB" TypeID="SystemCenter!Microsoft.SystemCenter.CollectEvent" />
  </WriteActions>
</Rule>

Information

   

Module Type

DataSourceModuleType

Input Type

None

Output Type

System.Event.Data

Implementation

Native

Library

System.NetworkManagement.Library