SNMP actor adapter requests and responses with a get action

When you use a context item as an input for an adapter request, you must enclose the adapter request in the <request-data> elements. However, when you create a static request, <request-data> is not required and the adapter request starts with the <adapterName-adapter-request> element.

BMC recommends that you do not use empty elements in the adapter request because they might cause errors.

The following table describes the common elements of an SNMP adapter request with a get action for SNMPv1, SNMPv2c, and SNMPv3 traps.

Elements of a SNMP adapter request with a get action

Element

Description

Required

<host>

Specifies the host name or the IP address of the destination host computer for the SNMP request

Yes

<port>

Specifies the destination port for the SNMP request.

Default value: 161

No

<community>

Specifies the SNMP community string (contains the statistics of a device)

Conditional; required if SNMPv1 or SNMPv2c is used

<version>

Specifies the SNMP version to use

Valid values: 1 (default), 2c, 3

No

<retries>

Specifies the number of times to retry a request.

Default value: 2

No

<timeout>

Specifies the number of seconds to wait before a retry attempt.

Default value: 3

No

<oids>

Contains the object identifier (OID) elements, <oid>, used to specify dynamic values

This element is required, even if <oid> nodes are not defined.

Yes

<oid>

Contains the name and value pair indicating the OID to the query

Conditional; required if <name> and <value> elements are defined

<name>

Specifies the OID reference name used in the adapter response

Note

The <name> and <value> element pair is ignored if:

  • You do not provide the value of either element.
  • You specify only a single element from the pair.

No

<value>

Specifies the OID for which information is returned

Note

The <name> and <value> element pair is ignored if:

  • You do not specify the value of either element.
  • You specify only a single element from the pair.

No

<character-set>

Specifies the supporting CharSet

Also called character set, it includes identifiers describing a series of universal characters.

Default value: ISO-8859-1

No


The following figure shows an XML template for the SNMP adapter request with a get action.

XML template of the SNMP adapter request with a get action


<snmp-adapter-request>
  <host></host>
  <port></port>
  <community></community>
  <version></version>
  <retries></retries>
  <timeout></timeout>
  <oids>
    <oid>
      <name></name>
      <value></value>
    </oid>
    ...
  </oids>
  <character-set></character-set>
</snmp-adapter-request>


The following figure shows an XML sample of the SNMP adapter request with a get action.

XML sample of the SNMP adapter request with a get action


<snmp-adapter-request>
   <host>10.254.1.111</host>
   <port>161</port>
   <community>public</community>
   <oids>
      <oid>
        <name>Automation Testing</name>
        <value>.1.3.6.1.2.1.1.1.0</value>
      </oid>
   </oids>
   <character-set>shift_jis</character-set>
</snmp-adapter-request>

The following table describes the SNMP actor adapter request elements with a get action for SNMPv3 trap.

Elements of an SNMP actor adapter request with a get action for SNMPv3 trap

Element

Description

Required

<user-name>

Specifies the user name to authenticate the SNMPv3 request

Yes

<authentication-protocol>

Specifies the protocol that is used to encrypt the authentication password

Valid values: MD5 (default), SHA

No

<authentication-password>

Specifies the password for the specified <authentication-protocol>

Valid value: Any string; must contain at least eight characters

Conditional; required if <authentication-protocol> is used

<privacy-password>

Specifies the password used to encrypt the SNMP packet

Valid value: Any string; must contain at least eight characters

No

Note

SNMPv3 uses User-based Security Model (USM) to authenticate and encrypt the SNMP packet.

The following table describes the three types (security modes) of SNMPv3 users.

Types of SNMPv3 users

Security mode

Description

No Authentication No Privacy (noAuthNoPriv)

You must provide only user name to validate the request

No security is implemented.

Authentication No Privacy (authNoPriv)

You must provide a user name and an authentication password in the request

The message is authenticated.

Authentication Privacy (authPriv)

You must provide a user name, an authentication password, and a privacy password in the request

The message is authenticated and encrypted.

Note

The SNMP adapter supports only DES as a valid protocol when the security mode is authPriv.

The following figure shows an XML sample of the SNMP adapter request with a get action for an SNMPv3 trap.

XML sample of the SNMP adapter request with a get action for an SNMPv3 trap


<snmp-adapter-request>
      <host>212.30.73.70</host>
      <port>161</port>
      <version>3</version>
      <user-name>MD5_User</user-name>
      <authentication-password>AuthPassword</authentication-password>
      <authentication-protocol>md5</authentication-protocol>
      <oids>
        <oid>
          <name>oid2</name>
          <value>.1.3.6.1.2.1.1.1.0</value>
        </oid>
        <oid>
          <name>oid2</name>
          <value>.1.3.6.1.2.1.1.1.0</value>
        </oid>
      </oids>
</snmp-adapter-request>

The SNMP actor adapter returns an adapter response that contains the OID name and response values returned from the adapter request. There can be multiple OID nodes in the response.

The following table describes the elements of an SNMP actor adapter response to a request with a get action.

Elements of an SNMP actor adapter response to a request with a get action

Element

Description

<metadata>

Contains the summary information for the request

<status>

Indicates the status of the request execution

Valid values: success, error

<error>

Contains the error message if an interruption occurs during the execution of a request

When the value of the <status> element is success, this element is absent.

<execution-milliseconds>

Specifies the duration of the request execution, in milliseconds

<oids>

Contains all the <oid> name and value pairs returned

<oid>

Contains the values returned from the SNMP adapter request

<name>

Specifies the OID name requested in the adapter request

<value>

Contains the result of the SNMP get action, performed for the requested OID

The following figure shows an XML sample for SNMP adapter response with a get action

XML sample of the SNMP adapter response with a get action


<snmp-adapter-response>
   <metadata>
    <status>success</status>
    <error>Present only with status of 'error'</error>
    <execution-milliseconds>value</execution-milliseconds>
  </metadata>
  <oids>
    <oid>
    <name>name as defined in adapter request</name>
    <value>result of the SNMP Get for the requested OID</value>
    </oid>
    ...
  </oids>
</snmp-adapter-response>

The following figure shows an XML sample for the SNMP adapter response with get action for SNMPv3 trap.

XML sample of the SNMP adapter response with get action for SNMPv3 trap


<snmp-adapter-response>
  <metadata>
    <status>success</status>
    <execution-milliseconds>751</execution-milliseconds>
  </metadata>
  <oids>
    <oid>
      <name>oid2</name>
      <value>Hardware: x86 Family 6 Model 15 Stepping 8 AT/AT COMPATIBLE - Software: Windows 2000
 Version 5.0 (Build 2195 Uniprocessor Free)</value>
    </oid>
    <oid>
      <name>oid2</name>
      <value>Hardware: x86 Family 6 Model 15 Stepping 8 AT/AT COMPATIBLE - Software: Windows 2000
 Version 5.0 (Build 2195 Uniprocessor Free)</value>
    </oid>
  </oids>
</snmp-adapter-response>

This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

Comments