SNMP - Set

Declaration

<AMSNMPSETREQUEST HOST="text" NAME="text" COMMUNITY="text" TIMEOUT="number" TIMEOUTMEASURE="text (options)" BROADCASTDELAY="number" VALUE="text" RESULTDATASET="text (dataset name)" />

Description: Issues a SET message to an SNMP agent in order to alter the value of a variable.

IMPORTANT: To get the most out of SNMP activities, users should have a fundamental understanding of SNMP architecture and its major elements, such as Managers, Agents, MIBs, and PDUs.  

Practical Usage

Can be used to set the value of a SNMP variable on a SNMP capable agent such as a router.

Parameters

General

Property

Type

Required

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.

Variable Name

Text

Yes

(Empty)

  1. NAME="1.3.6.1.2.1.1.1.0"

  2. NAME="system.sysDescr.0"

The SNMP variable to set. This value can be an OID (Object Identifier) in either numeric or human-readable format.

Community

Text

Yes

Public

COMMUNITY="NetAuto"

The SNMP community.

Variable Syntax

Text (options)

No

integer

SYNTAX="ipaddress"

Specifies the type of data that will be set in the variable value parameter. The available options are:

  • integer (default): Specifies that value is an integer (number)

  • octetstring: Specifies that value is an octet string

  • objectid: Specifies that the value is an object identifier

  • null: Specifies that the value is a null value

  • ipaddress: Specifies that the value is an IP Address

  • counter32: Specifies that the value is a 32-bit counter

  • gauge32: Specifies that the value is a 32-bit gauge

  • timeticks: Specifies that the value is a time tick

  • opaque: Specifies that the value is opaque

  • counter64: Specifies that the value is a 64-but counter

  • unsignedinteger32: Specifies that the value is a 32-bit unsigned integer

Variable Value

Text

Yes

(Empty)

VALUE="the data"

The new value to set.

Advanced

Property

Type

Required

Default

Markup

Description

Timeout after

Text

Yes

30

TIMEOUT="500"

The total elapsed time that this activity should wait for a response before generating a timeout error. The default is 30 seconds.

Timeout measure

Text (options)

Yes

seconds

  1. TIMEOUTMEASURE="milliseconds"

  2. TIMEOUTMEASURE="seconds"

  3. TIMEOUTMEASURE="minutes"

  4. TIMEOUTMEASURE="hours"

The time measurement that corresponds to the value entered in the Timeout after parameter. The available options are:

  • milliseconds - Timeout value will be measured in milliseconds.

  • seconds (default) - Timeout value will be measured in seconds.

  • minutes - Timeout value will be measured in minutes.

  • hours - Timeout value will be measured in hours.

Broadcast delay

Number

No

3

BROADCASTDELAY="10"

The maximum broadcast delay time that this activity will allow. The default is 3 seconds.

Broadcast Measure

Text (options)

No

seconds

  1. BROADCASTMEASURE="milliseconds"

  2. BROADCASTMEASURE="seconds"

  3. BROADCASTMEASURE="minutes"

  4. BROADCASTMEASURE="hours"

The time measurement that corresponds to the broadcast delay value. The available options are:

  • milliseconds - Broadcast delay will be measured in milliseconds.

  • seconds (default) - Broadcast delay will be measured in seconds.

  • minutes - Broadcast delay will be measured in minutes.

  • hours - Broadcast delay will be measured in hours.

SNMP version

Text (options)

No

SNMPv1

  1. SNMPVERSION="SNMPv1"

  2. SNMPVERSION="snmpv2c"

  3. SNMPVERSION="SNMPv3"

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

  • SNMPv1 (default)

  • SNMPv2c

  • SNMPv3

Remote port

Number

No

161

REMOTEPORT="555"

The TCP/IP port that should be used for the SNMP request. The default port is 161.

Data

Property

Type

Required

Default

Markup

Description

Create and populate dataset (optional)

Text

No

(Empty)

RESULTDATASET="myData"

The name of the dataset that should be created and populated with the results of the request.


Description

Error Causes

On Error

Example

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

Description: Send SNMP Set message to "192.168.0.465" for variable "snmpSet" (new value:"192.168.0.851").  Syntax of variable is "ipaddress".  Community is "theCommunity2".  Use remote port 841.  Wait 20 seconds for responds after issuing a broadcast request.  

 

<AMSNMPSETREQUEST HOST="192.168.0.465" NAME="snmpSet" COMMUNITY="theCommunity2" REMOTEPORT="841" BROADCASTDELAY="20" VALUE="192.168.0.851" SYNTAX="ipaddress" />