SNMP actor adapter requests and responses with a notification action
The format of the SNMP actor adapter request with a notification action depends on the SNMP version.
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 include empty elements in the adapter request because they might cause errors.
The following table describes the common elements for the SNMP actor adapter request with a notification action for SNMPv1, SNMPv2c, and SNMPv3 traps.
Common elements for SNMP actor adapter request with a notification action for SNMPv1, SNMPv2c, and SNMPv3 traps
Element |
Description |
Required |
---|---|---|
|
Specifies the host name or the IP address of the target computer that receives the SNMP notification |
Yes |
|
Specifies the host name or the IP address of the source computer that sends the SNMP notification |
No |
|
Specifies the target port for the SNMP notification |
No |
|
Specifies the SNMP version to be used |
No |
|
Contains the |
Yes; even if |
|
Contains the name and value pair for the OID (object identifier) notification |
Conditional; required if the |
|
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 OID data type
|
No |
|
Specifies the supporting CharSet |
No |
The following figure shows an XML sample of the SNMP adapter request with a notification action supporting CharSet.
XML template of the SNMP adapter request with a notification action supporting CharSet
<snmp-adapter-request>
<target-host>10.128.249.29</target-host>
<source-host>10.128.249.30</source-host>
<port>162</port>
<enterprise>.1.3.6.1.4.1.2021</enterprise>
<generic>6</generic>
<specific>100</specific>
<community>public</community>
<oids>
<oid>
<value>JT</value>
<name>.1.3.6.1.4.1.2021.3.4.0</name>
<type>string</type>
</oid>
<oid>
<value>123</value>
<name>.1.3.6.1.4.1.2021.3.5.0</name>
<type>integer</type>
</oid>
</oids>
<character-set>shift_jis</character-set>
</snmp-adapter-request>
The following table describes the additional elements for an SNMP actor adapter request with a notification action for an SNMPv1 trap.
Additional elements for an SNMP actor adapter request with a notification action for an SNMPv1 trap
Element |
Description |
Required |
---|---|---|
|
Specifies the SNMP community string |
Yes |
|
Specifies the enterprise OID or string |
Yes |
|
Specifies the generic trap type |
Yes |
|
Specifies the specific trap type (traps for specific MIBs) |
Yes |
The following figure shows the XML template of the SNMP adapter request with a notification action for an SNMPv1 trap.
XML template of the SNMP adapter request with a notification action for an SNMPv1 trap
<snmp-adapter-request>
<target-host></target-host>
<source-host></source-host>
<port></port>
<community></community>
<enterprise></enterprise>
<generic></generic>
<specific></specific>
<oids>
<oid>
<name></name>
<value></value>
<type></type>
</oid>
</oids>
<character-set></character-set>
</snmp-adapter-request>
The following figure shows an XML sample of the SNMP adapter request with a notification action for an SNMPv1 trap.
XML sample of an SNMP actor adapter request with a notification action for an SNMPv1 trap
<snmp-adapter-request>
<target-host>host name or IP address</target-host>
<source-host>host name or IP address</source-host>
<port>port number</port>
<community>SNMP community</community>
<enterprise>the enterprise OID or string</enterprise>
<generic>generic trap type</generic>
<specific>specific trap type</specific>
<oids>
<oid>
<name>actual OID</name>
<value>Value of theOID</value>
<type>valid OID data type</type>
</oid>
</oids>
<character-set>character set</character-set>
</snmp-adapter-request>
The following table describes the additional elements of an SNMP adapter request with a notification action for an SNMPv2c trap.
Additional elements of an SNMP adapter request with a notification action for an SNMPv2c trap
Element |
Description |
Required |
---|---|---|
|
Specifies the SNMP community string |
Yes |
|
Specifies the object identifier (OID) of the trap or notification being sent |
Yes |
The following figure shows an XML template of the SNMP adapter request with a notification action for an SNMPv2c trap.
XML template of the SNMP adapter request with a notification action for an SNMPv2c trap
<snmp-adapter-request>
<version></version>
<target-host></target-host>
<source-host></source-host
<port></port>
<community></community>
<version>2c</version>
<trap-oid></trap-oid>
<oids>
<oid>
<name></name>
<value></value>
<type></type>
</oid>
</oids>
<character-set></character-set>
</snmp-adapter-request>
The following figure shows an XML sample of the SNMP adapter request with a notification action for an SNMPv2c trap.
XML sample of the SNMP adapter request with a notification action for an SNMPv2c trap
<snmp-adapter-request>
<version>2c</version>
<target-host>10.128.249.29</target-host>
<source-host>10.128.249.30</source-host>
<port>162</port>
<trap-oid>.1.3.6.1.4.1.2021.100</trap-oid>
<community>public</community>
<oids>
<oid>
<value>JT</value>
<name>.1.3.6.1.4.1.2021.3.4.0</name>
<type>string</type>
</oid>
<oid>
<value>123</value>
<name>.1.3.6.1.4.1.2021.3.5.0</name>
<type>integer</type>
</oid>
</oids>
<character-set>shift_jis</character-set>
</snmp-adapter-request>
The following table describes the SNMP actor adapter request elements with a notification action for an SNMPv3 trap.
SNMP actor adapter request with a notification action for an SNMPv3 trap elements
Element |
Description |
Required |
---|---|---|
|
Specifies the object identifier (OID) of the trap or notification being sent |
Yes |
|
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 |
|
Specifies the engine ID used to authenticate the SNMP request |
No |
Note
SNMPv3 uses User-based Security Model (USM) to authenticate and encrypt the SNMP packet.
The following table describes the types (security modes) of SNMPv3 users.
Types of SNMPv3 users
Security mode |
Description |
---|---|
No Authentication No Privacy ( |
You must provide only auser 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 notification action for an SNMPv3 trap.
XML sample of an SNMP adapter request with a notification action for an SNMPv3 trap
<snmp-adapter-request>
<version>3</version>
<target-host>10.128.249.29</target-host>
<source-host>10.128.249.30</source-host>
<port>162</port>
<user-name>traptest1</user-name>
<authentication-password>mypassword</authentication-password>
<trap-oid>.1.3.6.1.4.1.2021.100</trap-oid>
<privacy-password>mypassword</privacy-password>
<authentication-protocol>sha</authentication-protocol>
<oids>
<oid>
<value>JT</value>
<name>.1.3.6.1.4.1.2021.3.4.0</name>
<type>string</type>
</oid>
<oid>
<value>123</value>
<name>.1.3.6.1.4.1.2021.3.5.0</name>
<type>integer</type>
</oid>
</oids>
<character-set>shift_jis</character-set>
</snmp-adapter-request>
For SNMPv1, SNMPv2c, and SNMPv3 traps, the SNMP actor adapter returns an adapter response that contains the summary information for the adapter request.
The following table describes the elements of an SNMP actor adapter response to a request with notification action.
Elements of an SNMP actor adapter response to a request with notification action
Element |
Description |
---|---|
|
Contains the summary information of the request |
|
Indicates the status of the request execution |
|
Contains the error message if an interruption during the execution of a request |
|
Specifies the duration of the request execution, in milliseconds |
The following figure shows an XML sample for the SNMP adapter response with notification action.
XML sample of the SNMP adapter response with notification action
<snmp-adapter-response>
<metadata>
<status>success</status>
<error>Present only with status of 'error'</error>
<execution-milliseconds>value</execution-milliseconds>
</metadata>
</snmp-adapter-response>
The following figure shows an XML sample for the SNMP adapter response with notification action for SNMPv2c trap.
XML sample of the SNMP adapter response with notification action for SNMPv2c trap
<snmp-adapter-response>
<metadata>
<status>success</status>
<execution-milliseconds>20</execution-milliseconds>
</metadata>
</snmp-adapter-response>
The following figure shows an XML sample for the SNMP adapter response with notification action for SNMPv3 trap.
XML sample of the SNMP adapter response with notification action for SNMPv3 trap
<snmp-adapter-response>
<metadata>
<status>success</status>
<execution-milliseconds>270</execution-milliseconds>
</metadata>
</snmp-adapter-response>
Comments
Log in or register to comment.