Sending SNMP Traps and Informs

There are two types of SNMP notifications: Traps and Inform requests. The main difference between them is reliability. Traps are unacknowledged and thus unreliable because the sender does not know if the trap was received. SNMPv2 fixed this by introducing the Inform notifications, which can be regarded as acknowledged Traps. Inform sender can now wait for an acknowledgement from the receiver. If the acknowledgment did not arrive with a certain time interval, the notification can be resent.

At the same time, Informs put additional overhead on network and computational resources: original Inform notification should be kept in sender's memory until a response is received, it needs additional processing on receiver and increase traffic when is repeated.

Traps and Informs allow to find a balance between reliability and resources: for important notifications you can use Informs, while "ordinary" ones can be sent as Traps.

Iotellect Network Manager can generate both types of SNMP notifications using Send SNMP Trap (sendSnmpTrap) action in Root context.

You can invoke Send SNMP Trap action manually by activating context menu of server node () in System Tree, choosing Network Management submenu and selecting Send SNMP Trap. Alternatively, you can configure traps to be sent in response to an alert -- see corrective actions for details.

Input Format

The action can be configured with parameters of the following format:

Name

Type

Description

Details

trapType

String

Notification Type

Notification type: Trap or Inform.

targetAddress

String

IP Address or Host Name

Address of the trap's receiver.

port

Integer

Port

Port the trap will be sent to (162 by default).

protocol

String

Protocol

Transport Protocol to be used to deliver trap (UDP or TCP).

timeout

Long

Timeout

Timeout before a confirmed request is resent or timed out (5 seconds by default).

enterprise

String

Enterprise or Trap OID

Trap's Enterprise for SNMP version 1, or Trap/Inform's OID for SNMP versions 2(c) and 3.

variableBindings

Data Table

Variable Bindings

Variables bindings to be associated with the trap. Bindings are defined in a table with the following format:

Name

Type

Description

variableBindingsOID

String

Variable OID

variableBindingsType

Integer

Variable Type

variableBindingsValue

String

Variable Value

snmpVersion

Integer

SNMP Protocol Version

SNMP version.

community

String

Community

Community string (for notifications of SNMP versions 1 and 2)

userName

String

Username

Username for version 3 notifications. Note, that system tries to find authentication and privacy passwords in SNMP Users Table (using specified Username and Engine ID). Thus, a record for the user must exist in the table.

engineId

Data

Authoritative Engine ID

Binary-encoded engine ID. Required for version 3 notifications, and must be configured on the physical device.

securityLevel

Integer

Security Level

Security level for version 3 notifications.

Output Format

The action returns nothing for Traps. For Informs, the response is returned in the following format:

Name

Type

Description

Details

variableBindings

Data Table

Variable Bindings

Data returned as response to Inform. Bindings are defined in a table with the following format:

Name

Type

Description

variable

String

Variable

value

String

Value

errorMessage

String

Error

Textual description of the success/error status.

Was this page helpful?