System.NetworkManagement.SnmpDataSource

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

The System.NetworkManagement.SnmpDataSource data source module type provides System.SnmpData type data.

Usage

This module is used to retrieve data from an SNMP object.

Type Definition

<DataSourceModuleType ID="System.NetworkManagement.SnmpDataSource" Accessibility="Public" Batching="false">
  <Configuration>
    <IncludeSchemaTypes>
      <SchemaType>System!System.ExpressionEvaluatorSchema</SchemaType>
      <SchemaType>Snmp!System.SnmpVarBindsSchema</SchemaType>
    </IncludeSchemaTypes>
    <xsd:element name="Scheduler" type="PublicSchedulerType" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element minOccurs="0" maxOccurs="1" name="NoOfRetries" type="xsd:unsignedInt" default="3" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element minOccurs="0" maxOccurs="1" name="Timeout " type="xsd:unsignedInt" default="500" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element minOccurs="0" maxOccurs="1" name="Port" type="xsd:unsignedInt" default="161" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element minOccurs="0" maxOccurs="1" name="SNMPv3UserName" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element minOccurs="0" maxOccurs="1" name="SNMPv3AuthProtocol" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element minOccurs="0" maxOccurs="1" name="SNMPv3AuthPassword" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element minOccurs="0" maxOccurs="1" name="SNMPv3PrivProtocol" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element minOccurs="0" maxOccurs="1" name="SNMPv3PrivPassword" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element minOccurs="0" maxOccurs="1" name="SNMPv3ContextName" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element name="IP" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element name="CommunityString" 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 name="SnmpVarBinds" type="SnmpVarBindsType" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element minOccurs="0" maxOccurs="1" name="CodePage " type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element minOccurs="0" maxOccurs="1" name="OutputOnError" type="xsd:boolean" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
  </Configuration>
  <ModuleImplementation Isolation="Any">
    <Native>
      <ClassID>0E6AF9F6-754A-42c8-A5D9-0AE71A53F96E</ClassID>
    </Native>
  </ModuleImplementation>
  <OutputType>Snmp!System.SnmpData</OutputType>
</DataSourceModuleType>

Parameters

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

Parameter Type Overrideable Description

Scheduler

PublicSchedulerType

False

Required parameter. Sets the schedule on which to run the module.

NoOfRetries

Integer

False

Optional parameter. The number of times that an SNMP GET operation will retry if it times out. Defaults to 3.

Timeout

Integer

False

Optional parameter. The amount of time (in milliseconds) before an SNMP GET operation times out. Defaults to 500.

Port

Integer

False

Optional parameter. Specifies the port to use on the SNMP managed entity. Defaults to 161.

SNMPv3UserName

String

False

Optional parameter. Specifies the SNMPv3 user name, if one is used.

SNMPv3AuthProtocol

String

False

Optional parameter. Specifies the SNMPv3 authorization protocol, if one is used.

SNMPv3AuthPassword

String

False

Optional parameter. Specifies the SNMPv3 authorization password, if one is used.

SNMPv3PrivProtocol

String

False

Optional parameter. Specifies the SNMPv3 privacy protocol, if one is used.

SNMPv3PrivPassword

String

False

Optional parameter. Specifies the SNMPv3 privacy password, if one is used.

SNMPv3ContextName

String

False

Optional parameter. Specifies the SNMPv3 context name, if one is used.

IP

String

False

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

CommunityString

String

False

Required parameter. Contains the SNMP Community String.

Version

String

False

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

SnmpVarBinds

SnmpVarBindsType

False

Required parameter. Contains a list of SNMP variable bindings as SnmpVarBind elements.

CodePage

String

False

Optional parameter. For devices that send non-ASCII characters, specifies the code page used to convert non-ASCII strings to Unicode.

OutputOnError

Boolean

False

Optional parameter. Indicates whether the workflow should continue if the device returns an error.

The SnmpVarBinds element contains an SMTP variable binding list. Each variable binding in the list is represented as an SnmpVarBind element. The SnmpVarBind element contains the following sub elements:

Element

Type

Description

OID

String

Specifies the SNMP OID of the entity in the SNMP MIB table.

Value

String

The value and variable type of OID entity. The variable type can be specified in the optional VariantType property. The value of the Value element is set only when the IsWriteAction parameter is set to true and a SET action is to be performed.

The following table maps SNMP data types to VariantType strings:

 

SNMP MIB type VariantType Value Variant Type

Integer, Counters, Gauges, TimeTicks (SNMPv1 and SNMPv2)

3

VT_I4

Octet strings, Object Identifiers, IP Addresses, Opaques, Network Addresses

8

VT_BSTR

Null

1

VT_NULL

Syntax

String

The Syntax property indicates the failure or success of the SNMP operation and can be inspected by a condition detection module in a workflow. If the operation is successful, the module sets the value of this property to the appropriate SNMP syntax data type.

Note

Note that for SET operations, the Syntax property must be set to one of the SNMP syntax data types.

The following table maps SNMP syntax data types to the appropriate string values.

 

Syntax data type String value

SNMP_SYNTAX_INT

2

SNMP_SYNTAX_INT32

2

SNMP_SYNTAX_BITS

3

SNMP_SYNTAX_OCTETS

4

SNMP_SYNTAX_NULL

5

SNMP_SYNTAX_OID

6

SNMP_SYNTAX_NSAPADDR

8

SNMP_SYNTAX_SEQUENCE

48

SNMP_SYNTAX_IPADDR

64

SNMP_SYNTAX_CNTR32

65

SNMP_SYNTAX_GUAGE32

66

SNMP_SYNTAX_TIMETICKS

67

SNMP_SYNTAX_OPAQUE

68

SNMP_SYNTAX_NSAPADDR

69

SNMP_SYNTAX_CENTR64

70

SNMP_SYNTAX_UINT32

71

The following table maps SNMP error syntax data types to the appropriate string values.

 

Error syntax data type String value

SNMP_SYNTAX_NOSUCHOBJECT

128

SNMP_SYNTAX_NOSUCHINSTANCE

129

SNMP_SYNTAX_ENDOFMIBVIEW

130

For more information, see RFC 1902, "Structure of Management Information for Version 2 of the Simple Network Management Protocol (SNMPv2)."

The following examples demonstrate the appropriate syntax for defining SnmpVarBind elements for GET actions.

In the following sample code, an SnmpVarBind element is defined for a probe that is to perform a GET action on the sysDescr MIB element.

 
<SnmpVarBind>
   <OID>1.3.6.1.2.1.1.0</OID>
   <Syntax>0</Syntax>
   <Value VariantType=”8”/>
</SnmpVarBind>

Composition

The System.NetworkManagement.SnmpDataSource module is a native module.

Module Type Usage

System.NetworkManagement.SnmpPerformanceDataSource

Provides performance data for a specified SNMP object

External Module References

Module Type Usage

System.NetworkManagement.SnmpEventDataSource

Provides event data for a specified SNMP object

Sample

The following XML example shows how System.NetworkManagement.SnmpDataSource is used twice in a UnitMonitorType to provide the data for a single-event two-state monitor. The data from the data source is passed through an expression filter that could have many possible expressions, depending on the configuration.

<UnitMonitorType ID="System.NetworkManagement.SnmpProbe.2SingleEvent2StateMonitorType" Accessibility="Public">
  <MonitorTypeStates>
    <MonitorTypeState ID="FirstEventRaised" NoDetection="false" />
    <MonitorTypeState ID="SecondEventRaised" NoDetection="false" />
  </MonitorTypeStates>
  <Configuration>
    <IncludeSchemaTypes>
      <SchemaType>System!System.ExpressionEvaluatorSchema</SchemaType>
      <SchemaType>Snmp!System.SnmpVarBindsSchema</SchemaType>
    </IncludeSchemaTypes>
    <xsd:element name="FirstInterval" type="xsd:integer" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element name="FirstIP" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element minOccurs="0" maxOccurs="1" name="FirstVersion" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element name="FirstSnmpVarBinds" type="SnmpVarBindsType" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element name="FirstExpression" type="ExpressionType" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element name="SecondInterval" type="xsd:integer" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element name="SecondIP" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element minOccurs="0" maxOccurs="1" name="SecondVersion" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element name="SecondSnmpVarBinds" type="SnmpVarBindsType" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element name="SecondExpression" type="ExpressionType" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element name="NoOfRetries" type="xsd:unsignedInt" default="3" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element name="Timeout " type="xsd:unsignedInt" default="500" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element name="Port" type="xsd:unsignedInt" default="161" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
  </Configuration>
  <OverrideableParameters>
    <OverrideableParameter ID="FirstInterval" Selector="$Config/FirstInterval$" ParameterType="int" />
    <OverrideableParameter ID="SecondInterval" Selector="$Config/SecondInterval$" ParameterType="int" />
    <OverrideableParameter ID="NoOfRetries" Selector="$Config/NoOfRetries$" ParameterType="int" />
    <OverrideableParameter ID="Timeout" Selector="$Config/Timeout$" ParameterType="int" />
    <OverrideableParameter ID="Port" Selector="$Config/Port$" ParameterType="int" />
  </OverrideableParameters>
  <MonitorImplementation>
    <MemberModules>
      <DataSource ID="FirstDataSource" TypeID="System.NetworkManagement.SnmpDataSource">
        <Scheduler>
          <SimpleReccuringSchedule>
            <Interval Unit="Seconds">$Config/FirstInterval$</Interval>
          </SimpleReccuringSchedule>
          <ExcludeDates />
        </Scheduler>
        <NoOfRetries>$Config/NoOfRetries$</NoOfRetries>
        <Timeout>$Config/Timeout$</Timeout>
        <Port>$Config/Port$</Port>
        <IP>$Config/FirstIP$</IP>
        <CommunityString>$RunAs[Name="System.NetworkManagement.Snmp.MonitoringAccount"]/CommunityString$</CommunityString>
        <Version>$Config/FirstVersion$</Version>
        <SnmpVarBinds>$Config/FirstSnmpVarBinds$</SnmpVarBinds>
      </DataSource>
      <DataSource ID="SecondDataSource" TypeID="System.NetworkManagement.SnmpDataSource">
        <Scheduler>
          <SimpleReccuringSchedule>
            <Interval Unit="Seconds">$Config/SecondInterval$</Interval>
          </SimpleReccuringSchedule>
          <ExcludeDates />
        </Scheduler>
        <NoOfRetries>$Config/NoOfRetries$</NoOfRetries>
        <Timeout>$Config/Timeout$</Timeout>
        <Port>$Config/Port$</Port>
        <IP>$Config/SecondIP$</IP>
        <CommunityString>$RunAs[Name="System.NetworkManagement.Snmp.MonitoringAccount"]/CommunityString$</CommunityString>
        <Version>$Config/SecondVersion$</Version>
        <SnmpVarBinds>$Config/SecondSnmpVarBinds$</SnmpVarBinds>
      </DataSource>
      <ConditionDetection ID="FirstFilterCondition" TypeID="System!System.ExpressionFilter">
        <Expression>$Config/FirstExpression$</Expression>
      </ConditionDetection>
      <ConditionDetection ID="SecondFilterCondition" TypeID="System!System.ExpressionFilter">
        <Expression>$Config/SecondExpression$</Expression>
      </ConditionDetection>
    </MemberModules>
    <RegularDetections>
      <RegularDetection MonitorTypeStateID="FirstEventRaised">
        <Node ID="FirstFilterCondition">
          <Node ID="FirstDataSource" />
        </Node>
      </RegularDetection>
      <RegularDetection MonitorTypeStateID="SecondEventRaised">
        <Node ID="SecondFilterCondition">
          <Node ID="SecondDataSource" />
        </Node>
      </RegularDetection>
    </RegularDetections>
  </MonitorImplementation>
</UnitMonitorType>

Information

   

Module Type

DataSourceModuleType

Input Type

None

Output Type

System.SnmpData

Implementation

Native

Library

System.NetworkManagement.Library