Share via


System.SnmpQuery.FilteredEventProvider

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

The System.SnmpQuery.FilteredEventProvider composite data source module type is used to perform SNMP GET actions at the specified interval and convert the filtered response System.SnmpData data to the System.Event.Data data type. The module returns only data that has been successfully retrieved and processed.

Warning

The System.SnmpQuery.FilteredEventProvider module is included in System Center Operations Manager 2012 for backward compatibility only. Its functionality has been superseded by the System.NetworkManagement.SnmpEventDataSource module.

Usage

Use this module to get filtered SNMP data and convert it into event data at a scheduled, recurring interval. 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.SnmpQuery.FilteredEventProvider" Accessibility="Public">
  <Configuration>
    <IncludeSchemaTypes>
      <SchemaType>System!System.ExpressionEvaluatorSchema</SchemaType>
    </IncludeSchemaTypes>
    <xsd:element name="Interval" type="xsd:integer" />
    <xsd:element name="IsWriteAction" type="xsd:boolean" />
    <xsd:element name="IP" type="xsd:string" />
    <xsd:element name="CommunityString" type="xsd:string" />
    <xsd:element minOccurs="0" maxOccurs="1" name="Version" type="xsd:string" />
    <xsd:element name="SnmpVarBinds">
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element minOccurs="1" maxOccurs="unbounded" name="SnmpVarBind">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="OID" type="xsd:string" />
                <xsd:element name="Syntax" type="xsd:integer" />
                <xsd:element name="Value">
                  <xsd:complexType>
                    <xsd:simpleContent>
                      <xsd:extension base="xsd:string">
                        <xsd:attribute name="VariantType" type="xsd:integer" use="optional" />
                      </xsd:extension>
                    </xsd:simpleContent>
                  </xsd:complexType>
                </xsd:element>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
        </xsd:sequence>
      </xsd:complexType>
    </xsd:element>
    <xsd:element name="Expression" type="ExpressionType" />
  </Configuration>
  <ModuleImplementation>
    <Composite>
      <MemberModules>
        <DataSource TypeID="System.SnmpQueryProvider" ID="DataSource">
          <Interval>$Config/Interval$</Interval>
          <IsWriteAction>$Config/IsWriteAction$</IsWriteAction>
          <IP>$Config/IP$</IP>
          <CommunityString>$Config/CommunityString$</CommunityString>
          <Version>$Config/Version$</Version>
          <SnmpVarBinds>$Config/SnmpVarBinds$</SnmpVarBinds>
        </DataSource>
        <ConditionDetection TypeID="System!System.ExpressionFilter" ID="Filter">
          <Expression>$Config/Expression$</Expression>
        </ConditionDetection>
        <ConditionDetection TypeID="System!System.Event.GenericDataMapper" ID="Mapper">
          <EventOriginId>$Target/Id$</EventOriginId>
          <PublisherId>$MPElement$</PublisherId>
          <PublisherName>SnmpQuery</PublisherName>
          <Channel>SnmpQuery</Channel>
          <LoggingComputer />
          <EventNumber>0</EventNumber>
          <EventCategory>3</EventCategory>
          <EventLevel>0</EventLevel>
          <UserName />
          <Params />
        </ConditionDetection>
      </MemberModules>
      <Composition>
        <Node ID="Mapper">
          <Node ID="Filter">
            <Node ID="DataSource" />
          </Node>
        </Node>
      </Composition>
    </Composite>
  </ModuleImplementation>
  <OutputType>System!System.Event.Data</OutputType>
</DataSourceModuleType>

Parameters

The System.SnmpQuery.FilteredEventProvider module supports the following configuration parameters:

Parameter Type Description

Interval

Integer

Contains the interval, in seconds, at which the probe performs the SNMP operation.

IsWriteAction

Boolean

Setting this value has no effect. The module only performs GET operations and is therefore hard-coded to false.

IP

String

Specifies the IP address of the SNMP managed..

CommunityString

String

Contains the SNMP Community String.

Version

String

Optional. Specifies the SNMP version. The default value is “2”. To perform an SNMP v1 transaction, the value must be “1”.

SnmpVarBinds

Complex

Contains a list of SNMP variable bindings as SnmpVarBind elements. For more information, see the System.SnmpProbe topic.

Expression

Complex

Contains the expression parameter for its internal System.ExpressionFilter condition detection module with which to filter the SNMP data.

For more information on the Interval configuration parameter, see System.Scheduler.

For more information on the IP, IsWriteAction, CommunityString, Version and SNMPVarBinds configuration parameters, see System.SnmpProbe.

For more information on the Expression configuration parameter, see System.ExpressionFilter.

Composition

The System.SnmpQuery.FilteredEventProvider module is a composite module that contains the following member modules:

Workflow Run Order Module Type Usage

1

System.SnmpQueryProvider

Performs SNMP GET actions at the specified interval and returns the SNMP data as a System.SnmpData data type.

2

System.ExpressionFilter

Filters the incoming System.SnmpData data with the expression specified in the Expression configuration parameter.

3

System.Event.GenericDataMapper

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

Module Type Usage

System.SnmpEventProvider

Performs SNMP GET actions at the specified interval, and converts the response System.SnmpData data to the System.Event.Data data type.

System.SnmpScanQuery.FilteredEventProvider

Performs SNMP GET actions in the context of an IP range and at a specified interval. The module returns the filtered System.SnmpData data as a System.Event.Data data type.

System.SnmpQuery.EventProvider

Performs SNMP GET actions at the specified interval, and converts the response System.SnmpData data to a System.Event.Data data type.

External Module References

None.

Sample

The following example illustrates how you can use the System.SnmpQuery.FilteredEventProvider module in a rule that generates an alert whenever a Microsoft.SystemCenter.NetworkDevice object interface is unavailable.

<Rule ID="Microsoft.Samples.Snmp.DownInterfaceWriteEvent" Enabled="true" Target="MicrosoftSystemCenterNetworkDeviceLibrary!Microsoft.SystemCenter.NetworkDevice" Remotable="true">
  <Category>Custom</Category>
  <DataSources>
    <DataSource ID="SnmpEventData" TypeID="Snmp!System.SnmpQuery.FilteredEventProvider">
      <Interval>3600</Interval>
      <IsWriteAction>false</IsWriteAction>
      <IP>$Target/Property[Type="MicrosoftSystemCenterNetworkDeviceLibrary!Microsoft.SystemCenter.NetworkDevice"]/IPAddress$</IP>
      <CommunityString>public</CommunityString>
      <SnmpVarBinds>
        <SnmpVarBind>
          <OID>.1.3.6.1.2.1.2.2.1.8.8</OID>
          <Syntax>1</Syntax>
          <Value VariantType="8"></Value>
        </SnmpVarBind>
        <SnmpVarBind>
          <OID>.1.3.6.1.2.1.2.2.1.8.9</OID>
          <Syntax>1</Syntax>
          <Value VariantType="8"></Value>
        </SnmpVarBind>
      </SnmpVarBinds>
      <Expression>
        <And>
          <Expression>
            <SimpleExpression>
              <ValueExpression>
                <XPathQuery>SnmpVarBinds/SnmpVarBind[2]/Value</XPathQuery>
              </ValueExpression>
              <Operator>Equal</Operator>
              <ValueExpression>
                <Value>2</Value>
              </ValueExpression>
            </SimpleExpression>
          </Expression>
          <Expression>
            <SimpleExpression>
              <ValueExpression>
                <XPathQuery>SnmpVarBinds/SnmpVarBind[1]/Value</XPathQuery>
              </ValueExpression>
              <Operator>Equal</Operator>
              <ValueExpression>
                <Value>2</Value>
              </ValueExpression>
            </SimpleExpression>
          </Expression>
        </And>
      </Expression>
    </DataSource>
  </DataSources>
  <WriteActions>
    <WriteAction ID="Alert" TypeID="Health!System.Health.GenerateAlert">
      <Priority>1</Priority>
      <Severity>2</Severity>
      <AlertOwner />
      <AlertMessageId>$MPElement[Name="Microsoft.Samples.Snmp.AlertMessage"]$</AlertMessageId>
      <Suppression />
    </WriteAction>
  </WriteActions>
</Rule>

Information

   

Module Type

DataSourceModuleType

Output Type

System.Event.Data

Implementation

Composite

Library

System.Snmp.Library