Share via


System.SnmpScanQueryProvider

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

The System.SnmpScanQueryProvider data source module type is used to perform SNMP GET actions in the context of an IP range and at a specified interval. The module returns the data as a System.SnmpData data type.

Usage

Use this module to receive SNMP data from within an IP range at a specified interval inside a workflow such as a rule or monitor.

Type Definition

<DataSourceModuleType ID="System.SnmpScanQueryProvider" Accessibility="Public">
  <Configuration>
    <xsd:element name="Interval" type="xsd:integer" />
    <xsd:element name="IPStart" type="xsd:string" />
    <xsd:element name="IPEnd" type="xsd:string" />
    <xsd:element name="CommunityString" type="xsd:string" />
    <xsd:element name="Timeout" type="xsd:unsignedInt" />
    <xsd:element minOccurs="0" maxOccurs="1" name="Version" type="xsd:string" />
    <xsd:element name="OIDProps">
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element minOccurs="0" maxOccurs="unbounded" name="OIDProp" type="xsd:string" />
        </xsd:sequence>
      </xsd:complexType>
    </xsd:element>
  </Configuration>
  <ModuleImplementation>
    <Composite>
      <MemberModules>
        <DataSource TypeID="System!System.Scheduler" ID="DS1">
          <Scheduler>
            <SimpleReccuringSchedule>
              <Interval Unit="Seconds">$Config/Interval$</Interval>
            </SimpleReccuringSchedule>
            <ExcludeDates />
          </Scheduler>
        </DataSource>
        <ProbeAction TypeID="System.SnmpScanProbe" ID="P1">
          <IPStart>$Config/IPStart$</IPStart>
          <IPEnd>$Config/IPEnd$</IPEnd>
          <CommunityString>$Config/CommunityString$</CommunityString>
          <Timeout>$Config/Timeout$</Timeout>
          <Version>$Config/Version$</Version>
          <OIDProps>$Config/OIDProps$</OIDProps>
        </ProbeAction>
      </MemberModules>
      <Composition>
        <Node ID="P1">
          <Node ID="DS1" />
        </Node>
      </Composition>
    </Composite>
  </ModuleImplementation>
  <OutputType>System.SnmpData</OutputType>
</DataSourceModuleType>

Parameters

The System.SnmpScanQueryProvider module supports the following configuration parameters:

Parameter Type Description

Interval

Integer

Contains the interval at which to get the SNMP data.

IPStart

String

Specifies the start address of the IP range.

IPEnd

String

Specifies the end address of the IP range.

CommunityString

String

Contains the SNMP Community String.

Timeout

Unsigned Integer

Specifies the timeout in seconds of the probe action.

Version

String

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

OIDProps

Complex

Contains a list of OIDs upon which to perform the GET action.

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

For more information on the OIDProps configuration parameter, see System.SnmpScanProbe.

Composition

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

Workflow Run Order Module Type Usage

1

System.Scheduler

Triggers the subsequent probe module to run at a scheduled, recurring interval.

2

[System.SnmpScanProbe](https://review.docs.microsoft.com/en-us/previous-versions/system-center/developer/jj130507(v=msdn.10))

Performs SNMP GET actions in the context of an IP range. The module returns a System.SnmpData data type

Module Type Usage

System.SnmpQueryProvider

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

External Module References

The System.SnmpScanQueryProvider module is a member of the following modules:

Module Type Library Usage

System.SnmpScanQuery.EventProvider

System.Snmp.Library

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

System.SnmpQuery.FilteredEventProvider

System.Snmp.Library

Performs SNMP GET actions in the context of an IP range and at a specified interval. The module filters the returned System.SnmpData data and converts it to the System.Event.Data data type

Sample

The following example illustrates how you can use the System.SnmpScanQueryProvider module in a rule that generates an alert whenever a Microsoft.SystemCenter.NetworkDevice object interface is unavailable over a given IP range.

<Rule ID="Microsoft.Samples.Snmp.InterfaceDataScan"  Enabled="true" Target="MicrosoftSystemCenterNetworkDeviceLibrary!Microsoft.SystemCenter.NetworkDevice" Remotable="true">
  <Category>Custom</Category>
  <DataSources>
    <DataSource ID="SnmpInterfaceDataScan" TypeID="Snmp!System.SnmpScanQueryProvider">
      <Interval>50000000</Interval>
      <IPStart>10.194.229.10</IPStart>
      <IPEnd>10.194.229.11</IPEnd>
      <CommunityString>public</CommunityString>
      <Timeout>7200</Timeout>
      <OIDProps>
        <OIDProp>1.3.6.1.2.1.2.2.1.8.8</OIDProp>
        <OIDProp>.1.3.6.1.2.1.2.2.1.8.9</OIDProp>
      </OIDProps>
    </DataSource>
  </DataSources>
  <ConditionDetection TypeID="System!System.ExpressionFilter" ID="Filter">
    <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>
  </ConditionDetection>
  <WriteActions>
    <WriteAction ID="GenerateAlert" TypeID="Health!System.Health.GenerateAlert">
      <Priority>0</Priority>
      <Severity>0</Severity>
      <AlertMessageId>$MPElement[Name="Microsoft.Samples.Snmp.AlertMessage"]$</AlertMessageId>
      <Suppression>
        <SuppressionValue/>
      </Suppression>
    </WriteAction>
  </WriteActions>
</Rule>

Information

   

Module Type

DataSourceModuleType

Output Type

System.SnmpData

Implementation

Composite

Library

System.Snmp.Library