Previous Topic: SKIPPARMUPDATES Statement—Specify Whether to Update Job ParametersNext Topic: SNMPUSER Statement—Specify an SNMP v3 User Name


SNMPNODE Statement—Specify an SNMP OID, Host, Port, Version, and Other Options

The SNMPNODE statement specifies the SNMP OID (object identifier), host, port, version, and other options.

Supported Job Types

This statement is required for the following job types:

Syntax

This statement has the following format:

oid

Specifies the SNMP OID (object identifier) in numeric or string format. In an SNMP Trap Send job, it identifies the trap that you want to send. In an SNMP Value Get or Value Set job, it identifies the variable whose value you want to retrieve or change.

Limits: Up to 256 characters; case-sensitive

Examples: agentLogLevel, .1.3.6.1.2.1.1.6.0

Note: In an SNMP Value Set job, the MIB statement is required if the OID is specified in string (non-numeric) format.

HOST(host)

Specifies the host name or IP address of the network device. In an SNMP Trap Send job, it identifies the computer you want to send the SNMP trap to. In an SNMP Value Get or Value Set job, it identifies the device that hosts the MIB variable.

Limits: Up to 256 characters; case-sensitive

PORT(port)

(Optional) Specifies the port of the network device. In an SNMP Trap Send job, it identifies the port used to send the SNMP trap. In an SNMP Value Get or Value Set job, it identifies the port used to communicate with the network device.

Limits: Up to 5 digits

Default: 161 (SNPG_JOB and SNPS_JOB); 162 (SNPE_JOB)

VERSION(1|2|3)

Specifies the SNMP version. In an SNMP Trap Send job, it identifies the version used when generating the SNMP trap. In an SNMP Value Get or Value Set job, it identifies the version used when connecting to the network device. Options include the following:

1

Specifies SNMP Version 1 (v1).

2

Specifies SNMP Version 2 (v2).

3

Specifies SNMP Version 3 (v3).

INFORM

(Optional) Indicates that the SNMP Trap Send job sends the SNMP v2/v3 INFORM message if it exists. This option is recommended for SNMP v3.

SUBTREE

(Optional) Indicates that the SNMP Value Get job walks the whole SNMP subtree starting with the OID (oid).

Note: Enclose values that contain delimiters (such as spaces) in double quotation marks.

Example: Send an SNMP Trap to a Network Device

Suppose that you want to send the cybtrapstart trap to a network device using SNMP v3. In this example, five string parameters are passed to the trap. The host name of the network device is localhost and its port is 162. The job uses the AES privacy protocol and the SHA authentication protocol. The name of the MIB file is RFC1213-MIB.mib and the default engine ID is used. The credentials of user1 are used for authorization.

AGENT SNMPAGENT
MIB 'C:\SNMP\MIBs\RFC1213-MIB.mib'
SNMPNODE cybtrapstart HOST(localhost) PORT(162) VERSION(3)
SNMPUSER user1
AUTHPROTOCOL SHA
PRIVPROTOCOL AES
ENGINEID
PARAMETER TYPE(snmp:string) VALUE(p1)
PARAMETER TYPE(snmp:string) VALUE(p2)
PARAMETER TYPE(snmp:string) VALUE(p3)
PARAMETER TYPE(snmp:string) VALUE(p4)
PARAMETER TYPE(snmp:string) VALUE(p5)

Example: Query a Network Device for the Value of an SNMP Variable

Suppose that you want to know the value of the agentVersion variable hosted by a network device. In this example, the host name of the network device is host.example.com and its port is 161. The SNMP version is v2 and the read community is public. The name of the MIB file is RFC1213-MIB.mib, which is located on the agent computer.

AGENT SNMPAGENT
MIB 'C:\SNMP\MIBs\RFC1213-MIB.mib'
SNMPNODE agentVersion HOST(host.example.com) PORT(161) VERSION(2)
COMMUNITY public

Example: Query a Network Device for the Values of a Whole SNMP Subtree

Suppose that you want to retrieve the values of a whole SNMP subtree starting with the pluginManagerPluginsTable OID.

AGENT SNMPAGENT
MIB 'C:\SNMP\MIBs\RFC1213-MIB.mib'
SNMPNODE pluginManagerPluginsTable HOST(host.example.com) PORT(161) VERSION(2) +
  SUBTREE
COMMUNITY public