CoreAsp.SnmpRqst
- Last Updated: July 8, 2022
- 1 minute read
- WhatsUp Gold
This object is used to send SNMP requests to a remote device.
Initialize or Initialize2 must be called prior to any other members.
CoreAsp.SnmpRqst uses a three step process:
- Calls
InitializeorInitialize2to initialize the object against a particular device. - Sets optional parameters such as timeout value, port, etc.
- Performs any number of
Get,GetNext,GetMultipleorSetoperations against a device. Those operations return anComSnmpResponseobject that contains the status of the operation and the value either directly (useFailed/GetValue/GetOid) or as a list of SNMP variable binding returned as XML data (useGetPayload).
Method | Description | Returns |
|---|---|---|
|
Initialize( |
Initializes the
In Active Script Monitor and Script Performance Monitors, the device ID of the device to which the monitor is assigned can be obtained from the Context object: |
ComResult object |
|
Initialize2( |
Initializes the
|
ComResult object |
|
SetTimeoutMs( |
Sets the timeout value in milliseconds. If not specified, the timeout defaults to 2000 milliseconds.
|
ComResult object |
|
SetNumRetries( |
Sets the number of times to retry a request that has timed out. If not specified, failed requests are retried one time.
To send only one SNMP packet per request, set |
ComResult object |
|
SetPort( |
Sets the TCP/IP port to be used by
|
ComResult object |
|
Get( |
Issues an SNMP Get command to retrieve the value of the specified object.
|
ComSnmpResponse object |
|
GetNext( |
Issues an SNMP GetNext command to retrieve the value of the object that follows the specified object in lexicographic order.
|
ComSnmpResponse object |
|
GetMultiple( |
Issues an SNMP Get command for each of the objects specified.
|
ComSnmpResponse object |
|
Set( |
Issues an SNMP Set command to set an OID value on a device.
|
ComSnmpResponse object |