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 |
---|---|---|
|
Specifies the host name or the IP address of the destination host computer for the SNMP request |
Yes |
|
Specifies the destination port for the SNMP request. |
No |
|
Specifies the SNMP community string (contains the statistics of a device) |
Conditional; required if SNMPv1 or SNMPv2c is used |
|
Specifies the SNMP version to use |
No |
|
Specifies the number of times to retry a request. |
No |
|
Specifies the number of seconds to wait before a retry attempt. |
No |
|
Contains the object identifier (OID) elements, |
Yes |
|
Contains the name and value pair indicating the OID to the query |
Conditional; required if |
|
Specifies the OID reference name used in the adapter response Note The
|
No |
|
Specifies the OID for which information is returned Note The
|
No |
|
Specifies the supporting CharSet |
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 |
---|---|---|
|
Specifies the user name to authenticate the SNMPv3 request |
Yes |
|
Specifies the protocol that is used to encrypt the authentication password |
No |
|
Specifies the password for the specified |
Conditional; required if |
|
Specifies the password used to encrypt the SNMP packet |
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 ( |
You must provide only user name to validate the request |
Authentication No Privacy ( |
You must provide a user name and an authentication password in the request |
Authentication Privacy ( |
You must provide a user name, an authentication password, and a privacy password in the request |
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 |
---|---|
|
Contains the summary information for the request |
|
Indicates the status of the request execution |
|
Contains the error message if an interruption occurs during the execution of a request |
|
Specifies the duration of the request execution, in milliseconds |
|
Contains all the |
|
Contains the values returned from the SNMP adapter request |
|
Specifies the OID name requested in the adapter request |
|
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>
Comments
Log in or register to comment.