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">
Description: Issues a GET message to an SNMP agent to inspect the value of a variable.
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
Ordinarily used to get the value of an SNMP variable on an SNMP capable agent such as a router.
General Parameters
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) |
|
The SNMP variable to set. This value can be an OID (Object Identifier) in either numeric or human-readable format. |
Community |
Text |
Yes |
(Empty) |
COMMUNITY="NetAuto" |
The SNMP community name. |
Create and populate dataset |
Text |
Yes |
(Empty) |
RESULTDATASET="myData" |
The name of the dataset that should be created and populated with the results of the request. |
Advanced Parameters
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 |
|
The time measurement that corresponds to the value entered in the Timeout after parameter. The available options are:
|
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 |
|
The time measurement that corresponds to the broadcast delay value. The available options are:
|
SNMP version |
Text (options) |
No |
SNMPv1 |
|
The version of the SNMP protocol to use. The default is SNMP version 1 as it is the most prevalent. The available options are:
|
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 Parameters
Property |
Type |
Required |
Default |
Markup |
Description |
---|---|---|---|---|---|
Use string notation for OIDs |
Yes/No |
No |
Yes |
OIDSTRINGNOTATION="no" |
Specifies whether the variable should contain the returning OID in numeric or "human readable" format. If set to YES, the value will be returned in human readable format. If set to NO, the value will be returned in numeric format. This parameter is set to YES 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 set to YES, the step will return the value in string notation. If set to NO, this step will return the value in 32-bit number format. This parameter is set to YES by default. |
Example
The sample AML code below can be copied and pasted directly into the Steps panel of the Task Builder.
Description: This sample 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, make sure to modify settings to fit your network environment.
<AMVARIABLE NAME="snmpGet"></AMVARIABLE> <AMSNMPGETREQUEST HOST="192.168.015.4" NAME="snmpGet" COMMUNITY="theCommunity" REMOTEPORT="883" TIMEOUT="60" BROADCASTDELAY="30" RESULTDATASET="theDataset" /> <AMLOOP TYPE="DATASET" DATASET="theDataset"> <AMSHOWDIALOG>%snmpGet%</AMSHOWDIALOG> </AMLOOP>