SNMP actor adapter request 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 <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
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
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
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
The following table describes the types (security modes) of SNMPv3 users.
Types of SNMPv3 users
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>