SNMP - Get

Declaration

<AMSNMPGETREQUEST HOST="text" NAME="text" COMMUNITY="text" REMOTEPORT="text" TIMEOUT="number" BROADCASTDELAY="text" OIDSTRINGNOTATION="yes/no" TIMETICKSTRINGNOTATION="yes/no" SNMPVERSION="text (options)" RESULTDATASET="text">

Related Topics   

Overview

Issues a GET message to an SNMP agent to inspect the value of a variable.

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

Practical usage

Ordinarily used to collect the value of an SNMP variable on an 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 hostname of the SNMP agent.
Variable name Text Yes (Empty)
  • NAME="1.3.6.1.2.1.1.1.0"
  • NAME="system.sysDescr.0"
The SNMP variable to set. This value can be an OID (Object Identifier) in either numeric or human-readable format.
NOTE: This is not an Automate Desktop variable.
Community Text Yes (Empty) COMMUNITY="NetAuto" The SNMP community name.
Create and populate dataset Text Yes (Empty) RESULTDATASET="myData" The name of the dataset to create and populate with the results of the request.

Advanced

Property Type Required Default Markup Description
Timeout after Text Yes 30 TIMEOUT="30" The total elapsed time that this activity waits for a response before generating a timeout error. The default is 30 seconds.
Timeout measure Text (options) Yes seconds
  • TIMEOUTMEASURE="milliseconds"
  • TIMEOUTMEASURE="seconds"
  • TIMEOUTMEASURE="minutes"
  • TIMEOUTMEASURE="hours"
The time measurement that corresponds to the value entered in the Timeout after parameter. The available options are:
  • milliseconds - Timeout value is measured in milliseconds.
  • seconds (default) - Timeout value is measured in seconds.
  • minutes - Timeout value is measured in minutes.
  • hours - Timeout value is measured in hours.
Broadcast delay Number No 3 BROADCASTDELAY="10" The maximum broadcast delay time that this activity allows. The default is 3 seconds.
Broadcast Measure Text (options) No seconds
  • BROADCASTMEASURE="milliseconds"
  • BROADCASTMEASURE="seconds"
  • BROADCASTMEASURE="minutes"
  • BROADCASTMEASURE="hours"
The time measurement that corresponds to the broadcast delay value. The available options are:
  • milliseconds - Broadcast delay is measured in milliseconds.
  • seconds (default) - Broadcast delay is measured in seconds.
  • minutes - Broadcast delay is measured in minutes.
  • hours - Broadcast delay is measured in hours.
SNMP version Text (options) No SNMPv1
  • SNMPVERSION="SNMPv1"
  • SNMPVERSION="SNMPv2C"
  • 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
NOTE: SNMPv3 must be selected to enable the authentication protocol option.
Remote port Number No 161 REMOTEPORT="555" The TCP/IP port for the SNMP request. The default port is 161.
Authentication Protocol Text (options) No Do not use authentication
  • AUTHENTICATIONPROTOCOL="do not use authentication"
  • AUTHENTICATIONPROTOCOL="md5"
  • AUTHENTICATIONPROTOCOL="sha"
  • AUTHENTICATIONPROTOCOL="sha2"
SNMPv3 must be selected to make this potion available. The available options for Authentication algorithm are:
  • Do not use authentication (default) - No authentication is used.
  • MD5 (recommended) - MD5 authentication is used.
  • SHA - SHA authentication is used.
  • SHA2 - SHA2 authentication is used.
Discovery time out Number Yes 30 seconds DISCOVERYTIMEOUT="30seconds" The total elapsed time that this activity waits for a discovery before a timeout.
Authentication username Text Yes empty USERNAME="username" User name to configure the remote user.
Privacy Algorithm Text (options) No Do not encrypt messages
  1. PRIVACYALGORITHM="do not encrypt messages"
  2. PRIVACYALGORITHM="des"
  3. PRIVACYALGORITHM="aes192"
  4. PRIVACYALGORITHM="aes256"
  5. PRIVACYALGORITHM="3des"
  6. PRIVACYALGORITHM="aes"

The available options for Privacy are:

  • Do not encrypt messages (default) - No encryption is used.
  • DES (recommended) - DES encryption is used.
  • AES192 - AES192 encryption is used.
  • AES256 - AES256 encryption is used.
  • 3DES - 3DES encryption is used.
  • AES - AES encryption is used.
Authentication password Text Yes Empty

PASSWORD="password"

Password to configure the remote user.
Privacy password Text Yes Empty

PRIVACYPASSWORD="privacypassword'

Privacy password for the algorithm.

Data

Property Type Required Default Markup Description
Use string notation for OIDs Yes/No No Yes OIDSTRINGNOTATION="no" Specifies if the variable contains the returning OID in numeric or human readable format. If selected, the value is returned in human readable format. If disabled, the value is returned in numeric format. This parameter is selected by default.
Use string notation for timetick values Yes/No Yes Yes TIMETICKSTRINGNOTATION="no" Timetick variable types are normally a 32-bit number but they can be returned in string notation. If this parameter is selected, the step returns the value in string notation. If disabled, this step returns the value in 32-bit number format. This parameter is selected by default.

Description

Error Causes

On Error

Example

NOTE:
  • Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
  • To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.

Description

The following sample task issues an SNMP Get message to an agent in order to inspect the value of a variable. This action can be used to get the value of an SNMP variable on an SNMP capable agent such as a router. In order for the task to work, modify the settings to fit your network environment.

Copy
<AMVARIABLE NAME="snmpGet" VALUE="" />
<AMSNMP ACTIVITY="get" HOST="192.168.015.4" NAME="snmpGet" COMMUNITY="theCommunity" RESULTDATASET="theDataset" TIMEOUT="60" BROADCASTDELAY="30" REMOTEPORT="883" />
<AMLOOP ACTIVITY="dataset" DATASET="theDataset" />
<AMSHOWDIALOG>%snmpGet%</AMSHOWDIALOG>
<AMLOOP ACTIVITY="end" />