Help Index Home > Report > Scripting API > SNMP

SNMP Class

Class methods

Instance properties

Instance methods

Notes

Set the host and the oid for the SNMP object to be retrieved, e.g. snmp.oid = "1.3.6.1.2.1.1.4.0" is the OID for sysContact. The get() function will return the value of the object corresponding to the oid. The getnext() function will retrieve the next object in the SNMP MIB and set the oid and value correspondingly.

The useconfig flag (true by default) determines whether snmp settings will be taken from the configuration file or will be provided directly in the script. If useconfig=true then snmp version and credential settings will only be applied if there is no configuration value applicable to the host. Setting useconfig=false overrides this behavior and only the values set in the script will be used.

The snmp settings can be provided by setting a version (1, 2c or 3) and credentials: community if the protocol = 1 or 2c and username, authprotocol, authpassword, privpassword if the protocol=3.

The retryintervals parameter can be set to an array of retry delays (expressed in milliseconds). A value of [20,40,100] would allow a maximum of three requests; one retry if a reply was not received within 20ms of the initial request, a second retry if no reply was received 40ms after the second request and the query would fail if no reply was received with 100ms of the third request.