Share via


System.NetworkManagement.ExtendedSnmpQueryProvider

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

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

Usage

This module is commonly used to retrieve SNMP data from a specified SNMP object at a specific recurring interval. You may need to get the information from the parent of the object, if the object itself cannot be queried. For example, the memory of a node cannot be queried directly, but you can get information on memory of a node by querying the host of the memory, the node itself. In that case, use the System.NetworkManagement.Host.ExtendedSnmpQueryProvider module instead.

Type Definition

<DataSourceModuleType ID="System.NetworkManagement.ExtendedSnmpQueryProvider" Accessibility="Public" Batching="false">
  <Configuration>
    <IncludeSchemaTypes>
      <SchemaType>Snmp!System.SnmpVarBindsSchema</SchemaType>
    </IncludeSchemaTypes>
    <xsd:element name="Interval" type="xsd:integer" 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="700" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element name="SnmpVarBinds" type="SnmpVarBindsType" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element name="OutputOnError" type="xsd:string" minOccurs="0" maxOccurs="1" default="false" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
  </Configuration>
  <ModuleImplementation Isolation="Any">
    <Composite>
      <MemberModules>
        <DataSource ID="ExtendedSnmpQueryProvider" TypeID="System.NetworkManagement.ExtendedSnmpQueryProvider.Internal">
          <Interval>$Config/Interval$</Interval>
          <NoOfRetries>$Config/NoOfRetries$</NoOfRetries>
          <Timeout>$Config/Timeout$</Timeout>
          <Port>$Target/Property[Type="NetworkLibrary!System.NetworkManagement.Node"]/PortNumber$</Port>
          <IP>$Target/Property[Type="NetworkLibrary!System.NetworkManagement.Node"]/SNMPAddress$</IP>
          <CommunityString>$RunAs[Name="NetworkLibrary!System.NetworkManagement.Snmp.MonitoringAccount"]/CommunityString$$Target/Property[Type="NetworkLibrary!System.NetworkManagement.Node"]/VirtualCommunitySuffix$</CommunityString>
          <Version>$Target/Property[Type="NetworkLibrary!System.NetworkManagement.Node"]/SNMPVersion$</Version>
          <SnmpVarBinds>$Config/SnmpVarBinds$</SnmpVarBinds>
          <OutputOnError>$Config/OutputOnError$</OutputOnError>
        </DataSource>
      </MemberModules>
      <Composition>
        <Node ID="ExtendedSnmpQueryProvider" />
      </Composition>
    </Composite>
  </ModuleImplementation>
  <OutputType>Snmp!System.SnmpData</OutputType>
</DataSourceModuleType>

Parameters

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

Parameter Type Overrideable Description

Interval

Integer

False

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

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 700.

SnmpVarBinds

SnmpVarBindsType

False

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

OutputOnError

String

False

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

For more information about the SnmpVarBind element, see System.NetworkManagement.SnmpDataSource.

Composition

The System.NetworkManagement.ExtendedSnmpQueryProvider module is a composite module that contains the member modules described in the following table.

Workflow Run Order Module Type Usage

1

System.NetworkManagement.ExtendedSnmpQueryProvider.Internal

Retrieves the raw data from the SNMP source.

Module Type Usage

System.NetworkManagement.Host.ExtendedSnmpQueryProvider

Used to retrieve SNMP data from the parent of the object instead of from the object itself.

External Module References

None

Sample

The following XML example shows how System.NetworkManagement.ExtendedSnmpQueryProvider is used in a unit monitor to retrieve the health state and availability of an SNMP object.

<UnitMonitorType ID="System.NetworkManagement.HealthStateSNMPAvailabilityMonitorType" Accessibility="Internal">
  <MonitorTypeStates>
    <MonitorTypeState ID="MTSDeviceSuccess" NoDetection="false" />
    <MonitorTypeState ID="MTSDeviceError" NoDetection="false" />
  </MonitorTypeStates>
  <Configuration>
    <xsd:element minOccurs="1" name="Interval" type="xsd:integer" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element minOccurs="0" maxOccurs="1" name="NoOfRetries" type="xsd:unsignedInt" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element name="NumberOfSamples" type="xsd:unsignedInt" minOccurs="0" maxOccurs="1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element minOccurs="0" maxOccurs="1" name="Timeout" type="xsd:unsignedInt" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
    <xsd:element minOccurs="1" name="OID" type="xsd:string" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
  </Configuration>
  <OverrideableParameters>
    <OverrideableParameter ID="Interval" Selector="$Config/Interval$" ParameterType="int" />
    <OverrideableParameter ID="NoOfRetries" Selector="$Config/NoOfRetries$" ParameterType="int" />
    <OverrideableParameter ID="NumberOfSamples" Selector="$Config/NumberOfSamples$" ParameterType="int" />
    <OverrideableParameter ID="Timeout" Selector="$Config/Timeout$" ParameterType="int" />
  </OverrideableParameters>
  <MonitorImplementation>
    <MemberModules>
      <DataSource ID="SnmpDataSource" TypeID="System.NetworkManagement.ExtendedSnmpQueryProvider">
        <Interval>$Config/Interval$</Interval>
        <NoOfRetries>$Config/NoOfRetries$</NoOfRetries>
        <Timeout>$Config/Timeout$</Timeout>
        <SnmpVarBinds>
          <SnmpVarBind>
            <OID>$Config/OID$</OID>
            <Syntax>0</Syntax>
            <Value VariantType="8" />
          </SnmpVarBind>
        </SnmpVarBinds>
        <OutputOnError>true</OutputOnError>
      </DataSource>
      <ProbeAction ID="EnableMonitoring" TypeID="System.NetworkManagement.EnableInstanceMonitoringOverrideAction">
        <ManagedEntityId>$Target/Id$</ManagedEntityId>
        <Value>true</Value>
      </ProbeAction>
      <ProbeAction ID="DisableMonitoring" TypeID="System.NetworkManagement.EnableInstanceMonitoringOverrideAction">
        <ManagedEntityId>$Target/Id$</ManagedEntityId>
        <Value>false</Value>
      </ProbeAction>
      <ConditionDetection ID="OperationStatusSuccess" TypeID="System.NetworkManagement.ExpressionFilter">
        <Expression>
          <And>
            <Expression>
              <SimpleExpression>
                <ValueExpression>
                  <XPathQuery Type="String">ErrorCode</XPathQuery>
                </ValueExpression>
                <Operator>Equal</Operator>
                <ValueExpression>
                  <Value Type="UnsignedInteger">1</Value>
                </ValueExpression>
              </SimpleExpression>
            </Expression>
            <Expression>
              <RegExExpression>
                <ValueExpression>
                  <XPathQuery Type="UnsignedInteger">SnmpVarBinds/SnmpVarBind[OID="$Config/OID$"]/Syntax</XPathQuery>
                </ValueExpression>
                <Operator>DoesNotMatchRegularExpression</Operator>
                <Pattern>^(5|128|129)$</Pattern>
              </RegExExpression>
            </Expression>
          </And>
        </Expression>
        <SuppressionSettings>
          <MatchCount>$Config/NumberOfSamples$</MatchCount>
          <SampleCount>$Config/NumberOfSamples$</SampleCount>
        </SuppressionSettings>
      </ConditionDetection>
      <ConditionDetection ID="OperationStatusError" TypeID="System.NetworkManagement.ExpressionFilter">
        <Expression>
          <Or>
            <Expression>
              <SimpleExpression>
                <ValueExpression>
                  <XPathQuery Type="String">ErrorCode</XPathQuery>
                </ValueExpression>
                <Operator>NotEqual</Operator>
                <ValueExpression>
                  <Value Type="UnsignedInteger">1</Value>
                </ValueExpression>
              </SimpleExpression>
            </Expression>
            <Expression>
              <RegExExpression>
                <ValueExpression>
                  <XPathQuery Type="UnsignedInteger">SnmpVarBinds/SnmpVarBind[OID="$Config/OID$"]/Syntax</XPathQuery>
                </ValueExpression>
                <Operator>MatchesRegularExpression</Operator>
                <Pattern>^(5|128|129)$</Pattern>
              </RegExExpression>
            </Expression>
          </Or>
        </Expression>
        <SuppressionSettings>
          <MatchCount>$Config/NumberOfSamples$</MatchCount>
          <SampleCount>$Config/NumberOfSamples$</SampleCount>
        </SuppressionSettings>
      </ConditionDetection>
    </MemberModules>
    <RegularDetections>
      <RegularDetection MonitorTypeStateID="MTSDeviceSuccess">
        <Node ID="EnableMonitoring">
          <Node ID="OperationStatusSuccess">
            <Node ID="SnmpDataSource" />
          </Node>
        </Node>
      </RegularDetection>
      <RegularDetection MonitorTypeStateID="MTSDeviceError">
        <Node ID="DisableMonitoring">
          <Node ID="OperationStatusError">
            <Node ID="SnmpDataSource" />
          </Node>
        </Node>
      </RegularDetection>
    </RegularDetections>
  </MonitorImplementation>
</UnitMonitorType>

Information

   

Module Type

DataSourceModuleType

Input Type

None

Output Type

System.SnmpData

Implementation

Composite

Library

System.NetworkManagement.Monitoring