Introduction

The QND.SNMP.Library.TableDiscovery.DS is a catch all discovery datasource based on QND.SNMP.GetTable.PT probe type. The data source implements a scheduler, a filter module useful to include only the table entries needed and a discovery data mapper.

Module Configuration

       <Configuration>
          <IncludeSchemaTypes>
            <SchemaType>System!System.ExpressionEvaluatorSchema</SchemaType>
            <SchemaType>System!System.Discovery.MapperSchema</SchemaType>
          </IncludeSchemaTypes>
          <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"/>
          <xsd:element minOccurs="1" maxOccurs="1" name="Filter" type="ExpressionType"/>
          <xsd:element name="ClassId" type="xsd:string" />
          <xsd:element name="InstanceSettings" minOccurs="0" maxOccurs="1" type="SettingsType" />
        </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>
The following table details the added parameters compared to QND.SNMP.GetTable.PT:
Parameter Type Description
IntervalSeconds Integer Frequency in seconds
SyncTime String Specifying a synchronization time forces the module to output a data item at the specified time, and it executes on that frequency based on that synchronization point.
Filter ExpressionType see http://msdn.microsoft.com/en-us/library/jj130463.aspx
ClassId string ID of the Class to be discovered
InstanceSettings SettingsType see http://msdn.microsoft.com/en-us/library/jj129745.aspx

 

Sample

      <DataSourceModuleType ID="Progel.LibraEsva.HostProcessor.Discovery.MT" Accessibility="Public" Batching="false">
        <Configuration>
          <xsd:element minOccurs="1" name="IntervalSeconds" type="xsd:integer" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element minOccurs="0" name="SyncTime" type="xsd:string" 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 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 minOccurs="1" name="DeviceKey" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element minOccurs="0" name="TraceLevel" type="xsd:integer" default="2" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
          <xsd:element minOccurs="0" name="ProbeTimeoutSeconds" type="xsd:integer" default="300" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
        </Configuration>
        <ModuleImplementation Isolation="Any">
          <Composite>
            <MemberModules>
              <DataSource ID="GetProcessor" TypeID="QSNMP!QND.SNMP.TableDiscovery.DS">
                <NoOfRetries>3</NoOfRetries>
                <Timeout>1000</Timeout>
                <Port>$Config/Port$</Port>
                <SNMPv3UserName>$RunAs[Name="Network!System.NetworkManagement.SnmpV3.MonitoringAccount"]/UserName$</SNMPv3UserName>
                <SNMPv3AuthProtocol>$RunAs[Name="Network!System.NetworkManagement.SnmpV3.MonitoringAccount"]/AuthenticationProtocol$</SNMPv3AuthProtocol>
                <SNMPv3AuthPassword>$RunAs[Name="Network!System.NetworkManagement.SnmpV3.MonitoringAccount"]/AuthenticationKey$</SNMPv3AuthPassword>
                <SNMPv3PrivProtocol>$RunAs[Name="Network!System.NetworkManagement.SnmpV3.MonitoringAccount"]/PrivacyProtocol$</SNMPv3PrivProtocol>
                <SNMPv3PrivPassword>$RunAs[Name="Network!System.NetworkManagement.SnmpV3.MonitoringAccount"]/PrivacyKey$</SNMPv3PrivPassword>
                <SNMPv3ContextName>$RunAs[Name="Network!System.NetworkManagement.SnmpV3.MonitoringAccount"]/ContextName$</SNMPv3ContextName>
                <IP>$Config/IP$</IP>
                <CommunityString>$Config/CommunityString$</CommunityString>
                <Version>$Config/Version$</Version>
                <TableOID>.1.3.6.1.2.1.25.3.2.1</TableOID>
                <TableIndex />
                <TraceLevel>$Config/TraceLevel$</TraceLevel>
                <ScriptTimeoutSeconds>$Config/ProbeTimeoutSeconds$</ScriptTimeoutSeconds>
                <IntervalSeconds>$Config/IntervalSeconds$</IntervalSeconds>
                <SyncTime>$Config/SyncTime$</SyncTime>
                <Filter>
                  <SimpleExpression>
                    <ValueExpression>
                      <XPathQuery Type="String">Property[@Name='.1.3.6.1.2.1.25.3.2.1.2']</XPathQuery>
                    </ValueExpression>
                    <Operator>Equal</Operator>
                    <ValueExpression>
                      <Value>.1.3.6.1.2.1.25.3.1.3</Value>
                    </ValueExpression>
                  </SimpleExpression>
                </Filter>
                <ClassId>$MPElement[Name='Progel.LibraEsva.HostProcessor']$</ClassId>
                <InstanceSettings>
                  <Settings>
                    <Setting>
                      <Name>$MPElement[Name='Network!System.NetworkManagement.Node']/DeviceKey$</Name>
                      <Value>$Config/DeviceKey$</Value>
                    </Setting>
                    <Setting>
                      <Name>$MPElement[Name='Network!System.NetworkManagement.LogicalDevice']/Key$</Name>
                      <Value>.1.3.6.1.2.1.25.3.2.1.1.$Data/Property[@Name='Index']$</Value>
                    </Setting>
                    <Setting>
                      <Name>$MPElement[Name='Network!System.NetworkManagement.LogicalDevice']/Index$</Name>
                      <Value>$Data/Property[@Name='Index']$</Value>
                    </Setting>
                    <Setting>
                      <Name>$MPElement[Name='Network!System.NetworkManagement.LogicalDevice']/Description$</Name>
                      <Value>Host Processor</Value>
                    </Setting>
                    <Setting>
                      <Name>$MPElement[Name='System!System.Entity']/DisplayName$</Name>
                      <Value>Processor</Value>
                    </Setting>
                  </Settings>
                </InstanceSettings>
              </DataSource>
            </MemberModules>
            <Composition>
              <Node ID="GetProcessor" />
            </Composition>
          </Composite>
        </ModuleImplementation>
        <OutputType>System!System.Discovery.Data</OutputType>
      </DataSourceModuleType>
      <Discovery ID="Progel.LibraEsva.HostProcessor.Discovery" Enabled="true" ConfirmDelivery="false" Remotable="true" Priority="Normal" Target="Progel.LibraEsva.Device">
        <Category>Discovery</Category>
        <DiscoveryTypes>
          <DiscoveryClass TypeID="Progel.LibraEsva.HostProcessor" />
        </DiscoveryTypes>
        <DataSource ID="DS" TypeID="Progel.LibraEsva.HostProcessor.Discovery.MT">
          <IntervalSeconds>43200</IntervalSeconds>
          <SyncTime />
          <Port>$Target/Property[Type="Network!System.NetworkManagement.Node"]/PortNumber$</Port>
          <IP>$Target/Property[Type="Network!System.NetworkManagement.Node"]/SNMPAddress$</IP>
          <CommunityString>$RunAs[Name="Network!System.NetworkManagement.Snmp.MonitoringAccount"]/CommunityString$$Target/Property[Type="Network!System.NetworkManagement.Node"]/VirtualCommunitySuffix$</CommunityString>
          <Version>$Target/Property[Type="Network!System.NetworkManagement.Node"]/SNMPVersion$</Version>
          <DeviceKey>$Target/Property[Type="Network!System.NetworkManagement.Node"]/DeviceKey$</DeviceKey>
          <TraceLevel>2</TraceLevel>
          <ProbeTimeoutSeconds>300</ProbeTimeoutSeconds>
        </DataSource>
      </Discovery>

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