SNMP Send Trap

Declaration

<AMSNMPSENDTRAP HOST="text" COMMUNITY="text" REMOTEPORT="number" SNMPVERSION="text [options]" ENTERPRISE="text" GENERICTYPE="text [options]" SPECIFICTYPE="number" TIMESTAMP="number" TIMESTAMPMEASURE="text [options]" VARBINDNAMES="text" VARBINDVALUES="text" VARBINDSYNTAXES="text [options]" />

See Also

SNMP Get | SNMP Get Next | SNMP Set | SNMP Walk | SNMP Send Trap | SNMP Walk |  MSMQ (Microsoft Message Queuing) | Microsoft SharePoint

Description

Simulates an SNMP trap message being sent from an SNMP agent.

Simple Network Management Protocol (SNMP) is a widely used protocol designed to facilitate the management of networked devices from a central location. Designed originally for the management of devices such as routers and switches, its usage has grown rapidly to encompass the monitoring of nearly any electronic device one can think of.

IMPORTANT: Use of the SNMP actions require a fundamental comprehension of SNMP, its required protocol data units (PDU) and other related terms, such as NMS or MIB.  

Practical Usage

Used to notify a Network Management System (NMS) of an event or condition that took place on a SNMP agent.

Parameters

General Properties

Property

Type

Req'd

Default

Markup

Description

Agent IP Address

Text

Yes

(Empty)

HOST="xxx.xxx.xxx.xxx"

The IP Address or host name of the SNMP agent to communicate with.

Community

Text

Yes

Public

COMMUNITY="NetAuto"

The SNMP community name.

Enterprise OID

Text

Yes

(Empty)

  1. NAME="system.sysDescr.0"

  2. NAME="1.3.6.1.2.1.1.1.0"

The OID for the network management system. This can be entered in either numeric or string notation format.

Trap Generic Type

Text (options)

No

enterprisespecific

GENERICTYPE="coldstart"

The generic type of the trap message. The available options are:

  • enterprisespecific (default): the type is specified by the trap specific code in the Trap Specific Number parameter

  • coldstart: agent is booting

  • warmstart: agent is rebooting

  • linkdown: an interface has gone down

  • linkup: an interface has come up

  • authenticationfailure: an invalid community was received in a message

  • egpneighborloss: an egp peer has gone down

Trap Specific Number

Number

No

(Empty)

SPECIFICTYPE="60"

The specific trap code. Valid only when the Trap Generic Type parameter is set to the default, enterprise specific.

Advanced Properties

Property

Type

Req'd

Default

Markup

Description

Use custom time for time stamp

Number

No

(Empty)

TIMESTAMP="100"

If enabled, specifies a custom time stamp. This parameter is disabled by default.

Timestamp measure

Text (options)

No

seconds

TIMESTAMPMEASURE="minutes"

The increment to use for the custom time stamp. The available options are:

  • milliseconds

  • seconds (default)

  • minutes

  • hours

Remote Port

Number

No

162

REMOTEPORT="170"

The TCP/IP port that should be used for the message. The default is 162.

Trap Specific Number

Text (options)

No

SNMPv1

SNMPVERSION="snmpv2c"

The version of the SNMP protocol to use. The default is SNMP version 1. The available options are:

  • SNMPv1 (default)

  • SNMPv2c

  • SNMPv3

Data Bindings Properties

Property

Type

Req'd

Default

Markup

Description

Variable name

Number

No

(Empty)

  1. VARBINDNAMES="system.sysDescr.0"

  2. VARBINDNAMES="1.3.6.1.2.1.1.1.0"

The name/OID for a variable to be associated with a value in order to further define the trap notification. This can be entered in either numeric or string notation format.

Variable Value

Text

No

(Empty)

VARBINDVALUES="the data"

The value to assign to the variable.

Variable Syntax

Text (options)

No

integer

VARBINDSYNTAXES="ipaddress"

The data type The available options are:

  • integer (default):  an integer

  • octetstring: an octet string

  • objectid: an object identifier

  • null: a null value

  • ipaddress: an IP Address

  • counter32: a 32-bit counter

  • gauge32: a 32-bit gauge

  • timeticks: a time tick

  • opaque: opaque

  • counter64: a 64-bit counter

  • unsignedinteger32: a 32-bit unsigned integer

Trap Specific Number

Text (options)

No

SNMPv1

SNMPVERSION="snmpv2c"

The version of the SNMP protocol to use. The default is SNMP version 1. The available options are:

  • SNMPv1 (default)

  • SNMPv2c

  • SNMPv3

 

Description Properties

The Description tab allows you to customize the text description of any step as it appears in the Task Builder's Steps Pane.

More on setting custom step description

Error Causes Properties

The Error Causes tab properties lets you instruct a task step to react only to specific errors or ignore certain errors that should cause it to fail.

More on Error Causes properties

On Error Properties

The On Error tab properties lets you determine what the task should do if a particular step encounters an error as defined in the Error Causes properties.

More about On Error properties

Additional Notes

Expressions, Variables & Functions

A percent sign is used as a special character in AutoMate to indicate the beginning and end of an expression. This allows variables, functions and other expressions to be entered in any text parameter of a task's properties. For example: %1+1% inside a task will resolve to 2 at runtime. A more elaborate example is %FileDateTime(myFile)% which results to the date/time of myFile. To help construct expressions, you can open Expression Builder by clicking the Insert Expression (%) button or by pressing F2.

More on expressions

More on variables

More on functions

More on extended functions
More on the expression builder

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

 

Description: Send SNMP trap to "127.0.0.1".  Enterprise generating the trap is "1.3.16.1.5.1.311.1.1.3".  Generic type is enterprisespecific (specific trap number 60).  Variable bindings are "1.3.16.1.5.1.311.1.1.3.1.1" (corresponding values: "450", corresponding syntaxes: "integer").  Send trap with time stamp 20 milliseconds.  Community is "CommunityName".  Use remote port 178.  Use SNMP version "snmpv2c" to send the message.  

 

<AMSNMPSENDTRAP HOST="127.0.0.1" COMMUNITY="CommunityName" REMOTEPORT="178" SNMPVERSION="snmpv2c" ENTERPRISE="1.3.16.1.5.1.311.1.1.3" SPECIFICTYPE="60" TIMESTAMP="20" TIMESTAMPMEASURE="milliseconds" VARBINDNAMES="1.3.16.1.5.1.311.1.1.3.1.1" VARBINDVALUES="450" VARBINDSYNTAXES="integer" />

 

↑ Top of Page