16.01.2013 Views

Ipswitch WhatsUp Gold User Guide - Ipswitch Documentation Server

Ipswitch WhatsUp Gold User Guide - Ipswitch Documentation Server

Ipswitch WhatsUp Gold User Guide - Ipswitch Documentation Server

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Using the SNMP API<br />

The <strong>WhatsUp</strong> <strong>Gold</strong> SNMP COM API has been enhanced to improve the performance of your<br />

scripted monitors and actions. With the addition of GetMultiple, you have the ability to get<br />

multiple OIDs within a single SNMP request. GetNext issues the SNMP GetNext command to<br />

retrieve the value of the object that follows a specified object. Finally, the addition of the<br />

SetFunction allows you to send SNMP set commands to your SNMP manageable devices.<br />

The SNMP API includes the following objects:<br />

CoreAsp.SnmpRqst. The main SNMP object used to send SNMP requests (Get,<br />

GetNext, Set) to a remote device.<br />

CoreAsp.ComResult. An object returned by certain methods of the SnmpRqst<br />

object to indicate success or failure.<br />

CoreAsp.ComResponse. A response object returned by certain methods of the<br />

SnmpRqst object that contain the status (either error or success) of an SNMP request<br />

and the value of the polled object(s).<br />

Note: There are several things to keep in mind when attempting to use the SNMP API. If you<br />

are experiencing errors, please see Troubleshooting the SNMP API (on page 949).<br />

CoreAsp.SnmpRqst<br />

This object is used to send SNMP requests to a remote device.<br />

Initialize or Initialize2 must be called prior to any other members.<br />

CoreAsp.SnmpRqst uses a three step process:<br />

1 Calls Initialize or Initialize2 to initialize the object against a particular device.<br />

2 Sets optional parameters such as timeout value, port, etc.<br />

3 Performs any number of Get, GetNext, GetMultiple or Set operations against a<br />

device. Those operations return an ComSnmpResponse object that contains the status<br />

of the operation and the value either directly (use Failed/GetValue/GetOid) or as a<br />

list of SNMP variable binding returned as XML data (use GetPayload).<br />

Method Description Returns<br />

Initialize(<br />

nDeviceID<br />

)<br />

Initializes the SnmpRqst object for the device with<br />

the device ID specified in nDeviceID. If a device is<br />

not configured with a valid SNMP credential, the<br />

operation will fail.<br />

nDeviceID. A positive integer<br />

corresponding to the device ID of a<br />

device configured in <strong>WhatsUp</strong> <strong>Gold</strong>.<br />

ComResult object<br />

942

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!