Introduction

The QND.SNMP.GetTable.PT is the core of all the other modules used for table discovery and monitoring.
The probe get's the table from the device and translates it in a set of property bag, more precisely one property bag set for each row in the table. This is accomplished through a powershell probe module.

SNMP tables are structured on a series of row identified by an index, each row is a different device and contains the properties (or columns) for the device. On a practical side tables have a base OID, followed by a property (or column) ID, followed by an index.

Relative OID / index

1

2

3

1

Base OID.1.1

Base OID.1.2

Base OID.1.3

2

Base OID.2.1

Base OID.2.2

Base OID.2.3

3

Base OID.3.1

Base OID.3.2

Base OID.3.3

4

Base OID.4.1

Base OID.4.2

Base OID.4.3

 

Let’s take as an example the interface table (ifTable) defined in RFC1213. The base OID is 1.3.6.1.2.1.2.2. The table is composed of rows of ifEntry with relative ID 1. So the base OID is actually 1.3.6.1.2.1.2.2.1 or ifEntry. The first column of the table is the index, so ifEntry.1 is the OID of the index property. To get the index of all the interfaces (rows or ifEntry) we must WALK ifEntry.1 and get something like:

ifEntry .1 .1 = 1

ifEntry .1 .2 = 2

ifEntry .1 .3 = 3

This means the device has 3 interfaces with index 1, 2 and 3.

The interface description property is identified by the relative OID 2, so following the above rules we have:

ifEntry .2 .1 to get the description (.2) of the interface with index .1

The interface type is identified by relative OID 3, so if I want to get the interface type for interface index 2 I must GET ifEntry.3.2 or 1.3.6.1.2.1.2.2.1.3.2

This probe type takes the SNMP structure and converts it to a set of dataitems, following the sample above the returned items would be:

<Collection>
  <DataItem type="System.PropertyBagData" time="2014-06-25T15:58:53.8212905+02:00" sourceHealthServiceId="7FBFA687-8EFB-6575-FEDF-CFBD7845E198">
    <Property Name="Index" VariantType="3">1</Property>
    <Property Name=".1.3.6.1.2.1.2.2.1.1" VariantType="8">1</Property>
    <Property Name=".1.3.6.1.2.1.2.2.1.2" VariantType="8">Interface Description</Property>
    <Property Name=".1.3.6.1.2.1.2.2.1.3" VariantType="8">Interface Type</Property>
  </DataItem>
  <DataItem type="System.PropertyBagData" time="2014-06-25T15:58:53.9462890+02:00" sourceHealthServiceId="7FBFA687-8EFB-6575-FEDF-CFBD7845E198">
    <Property Name="Index" VariantType="3">2</Property>
    <Property Name=".1.3.6.1.2.1.2.2.1.1" VariantType="8">2</Property>
    <Property Name=".1.3.6.1.2.1.2.2.1.2" VariantType="8">Interface Description</Property>
    <Property Name=".1.3.6.1.2.1.2.2.1.3" VariantType="8">Interface Type</Property>    
  </DataItem>
  <DataItem type="System.PropertyBagData" time="2014-06-25T15:58:53.9462890+02:00" sourceHealthServiceId="7FBFA687-8EFB-6575-FEDF-CFBD7845E198">
    <Property Name="Index" VariantType="3">3</Property>
    <Property Name=".1.3.6.1.2.1.2.2.1.1" VariantType="8">3</Property>
    <Property Name=".1.3.6.1.2.1.2.2.1.2" VariantType="8">Interface Description</Property>
    <Property Name=".1.3.6.1.2.1.2.2.1.3" VariantType="8">Interface Type</Property>
  </DataItem>
</Collection>

The returned property bag collections can then be used with out of the box Operations Manager modules.

Module configuration

      <ProbeActionModuleType ID="QND.SNMP.GetTable.PT" Accessibility="Public">
        <Configuration>
          <xsd:element minOccurs="0" maxOccurs="1" name="NoOfRetries" type="xsd:unsignedInt" default="3" />
          <xsd:element minOccurs="0" maxOccurs="1" name="Timeout" type="xsd:unsignedInt" default="500" />
          <xsd:element minOccurs="0" maxOccurs="1" name="Port" type="xsd:unsignedInt" default="161" />
          <xsd:element minOccurs="0" maxOccurs="1" name="SNMPv3UserName" type="xsd:string" />
          <xsd:element minOccurs="0" maxOccurs="1" name="SNMPv3AuthProtocol" type="xsd:string" />
          <xsd:element minOccurs="0" maxOccurs="1" name="SNMPv3AuthPassword" type="xsd:string" />
          <xsd:element minOccurs="0" maxOccurs="1" name="SNMPv3PrivProtocol" type="xsd:string" />
          <xsd:element minOccurs="0" maxOccurs="1" name="SNMPv3PrivPassword" type="xsd:string" />
          <xsd:element minOccurs="0" maxOccurs="1" name="SNMPv3ContextName" type="xsd:string" />
          <xsd:element name="IP" type="xsd:string" />
          <xsd:element name="CommunityString" type="xsd:string" />
          <xsd:element name="Version" type="xsd:string" />
          <xsd:element name="TableOID" type="xsd:string" />
          <xsd:element minOccurs="0" maxOccurs="1" name="TableIndex" type="xsd:string" default="1"/>
          <xsd:element minOccurs="0" maxOccurs="1" name="TraceLevel" type="xsd:unsignedInt" default="2"/>
          <xsd:element minOccurs="0" maxOccurs="1" name="ScriptTimeoutSeconds" type="xsd:unsignedInt" default="300"/>
        </Configuration>
        <OverrideableParameters>
          <OverrideableParameter ID="NoOfRetries" ParameterType="int" Selector="$Config/NoOfRetries$"/>
          <OverrideableParameter ID="Timeout" ParameterType="int" Selector="$Config/Timeout$"/>
          <OverrideableParameter ID="TraceLevel" ParameterType="int" Selector="$Config/TraceLevel$"/>
          <OverrideableParameter ID="ScriptTimeoutSeconds" ParameterType="int" Selector="$Config/ScriptTimeoutSeconds$"/>
        </OverrideableParameters>

The first set of parameters (from NoOfRetries up to Version) are Operations Manager standard SNMP parameters, the following MSDN page can be used as reference documentation: http://msdn.microsoft.com/en-us/library/jj130472.aspx

Parameter Type Description
TableOID String This is the starting OID for the table, in the previous example .1.3.6.1.2.1.2.2.1
TableIndex String This is the Index property for the table. It is typically 1. The parameter is marked optional with a defualt value of 1, but due to a bug in the powershell module must always be specified, if not you'll get a workflow error when the powershell is probe is called
TraceLevel Integer This is the levl of tracing in event log. The higher the number the higher the details logged. Above 3 sensitive informations can be logged in eventlog, for example community strings or SNMPv3 passphrases.
ScriptTimeoutSeconds Integer This is the time in seconds allowed to the powershell script to complete. It is different come the Timout parameters that states the timeout for every single SNMP call in milliseconds.

Sample

     <DataSourceModuleType ID="QND.SNMP.GetTable.DS" Accessibility="Public" Batching="false">
        <Configuration>
          <xsd:element minOccurs="0" maxOccurs="1" name="NoOfRetries" type="xsd:unsignedInt" default="3" />
          <xsd:element minOccurs="0" maxOccurs="1" name="Timeout" type="xsd:unsignedInt" default="500" />
          <xsd:element minOccurs="0" maxOccurs="1" name="Port" type="xsd:unsignedInt" default="161" />
          <xsd:element minOccurs="0" maxOccurs="1" name="SNMPv3UserName" type="xsd:string" />
          <xsd:element minOccurs="0" maxOccurs="1" name="SNMPv3AuthProtocol" type="xsd:string" />
          <xsd:element minOccurs="0" maxOccurs="1" name="SNMPv3AuthPassword" type="xsd:string" />
          <xsd:element minOccurs="0" maxOccurs="1" name="SNMPv3PrivProtocol" type="xsd:string" />
          <xsd:element minOccurs="0" maxOccurs="1" name="SNMPv3PrivPassword" type="xsd:string" />
          <xsd:element minOccurs="0" maxOccurs="1" name="SNMPv3ContextName" type="xsd:string" />
          <xsd:element name="IP" type="xsd:string" />
          <xsd:element name="CommunityString" type="xsd:string" />
          <xsd:element name="Version" type="xsd:string" />
          <xsd:element name="TableOID" type="xsd:string" />
          <xsd:element minOccurs="0" maxOccurs="1" name="TableIndex" type="xsd:string" default="1"/>
          <xsd:element minOccurs="0" maxOccurs="1" name="TraceLevel" type="xsd:unsignedInt" default="2"/>
          <xsd:element minOccurs="0" maxOccurs="1" name="ScriptTimeoutSeconds" type="xsd:unsignedInt" default="300"/>
          <xsd:element minOccurs="1" maxOccurs="1" name="IntervalSeconds" type="xsd:unsignedInt"/>
          <xsd:element minOccurs="0" maxOccurs="1" name="SyncTime" type="xsd:string"/>
        </Configuration>
        <OverrideableParameters>
          <OverrideableParameter ID="NoOfRetries" ParameterType="int" Selector="$Config/NoOfRetries$"/>
          <OverrideableParameter ID="Timeout" ParameterType="int" Selector="$Config/Timeout$"/>
          <OverrideableParameter ID="TraceLevel" ParameterType="int" Selector="$Config/TraceLevel$"/>
          <OverrideableParameter ID="ScriptTimeoutSeconds" ParameterType="int" Selector="$Config/ScriptTimeoutSeconds$"/>
          <OverrideableParameter ID="IntervalSeconds" ParameterType="int" Selector="$Config/IntervalSeconds$"/>
          <OverrideableParameter ID="SyncTime" ParameterType="string" Selector="$Config/SyncTime$"/>
        </OverrideableParameters>
        <ModuleImplementation>
          <Composite>
            <MemberModules>
              <DataSource ID="Scheduler" TypeID="System!System.Scheduler">
                <Scheduler>
                  <SimpleReccuringSchedule>
                    <Interval Unit="Seconds">$Config/IntervalSeconds$</Interval>
                    <SyncTime>$Config/SyncTime$</SyncTime>
                  </SimpleReccuringSchedule>
                  <ExcludeDates />
                </Scheduler>
              </DataSource>
              <ProbeAction ID="GetTable" TypeID="QND.SNMP.GetTable.PT">
                <NoOfRetries>$Config/NoOfRetries$</NoOfRetries>
                <Timeout>$Config/Timeout$</Timeout>
                <Port>$Config/Port$</Port>
                <SNMPv3UserName>$Config/SNMPv3UserName$</SNMPv3UserName>
                <SNMPv3AuthProtocol>$Config/SNMPv3AuthProtocol$</SNMPv3AuthProtocol>
                <SNMPv3AuthPassword>$Config/SNMPv3AuthPassword$</SNMPv3AuthPassword>
                <SNMPv3PrivProtocol>$Config/SNMPv3PrivProtocol$</SNMPv3PrivProtocol>
                <SNMPv3PrivPassword>$Config/SNMPv3PrivPassword$</SNMPv3PrivPassword>
                <SNMPv3ContextName>$Config/SNMPv3ContextName$</SNMPv3ContextName>
                <IP>$Config/IP$</IP>
                <CommunityString>$Config/CommunityString$</CommunityString>
                <Version>$Config/Version$</Version>
                <TableOID>$Config/TableOID$</TableOID>
                <TableIndex>$Config/TableIndex$</TableIndex>
                <TraceLevel>$Config/TraceLevel$</TraceLevel>
                <ScriptTimeoutSeconds>$Config/ScriptTimeoutSeconds$</ScriptTimeoutSeconds>
              </ProbeAction>
            </MemberModules>
            <Composition>
              <Node ID="GetTable">
                <Node ID ="Scheduler" />
              </Node>
            </Composition>
          </Composite>
        </ModuleImplementation>
        <OutputType>System!System.PropertyBagData</OutputType>
      </DataSourceModuleType>

Last edited Jun 25, 2014 at 2:31 PM by brandubh, version 2