Connect
Connect is used to establish a connection with a remote server and return an SNMPSimple Network Management Protocol is a protocol for network management. It is used to collect information from network devices, such as servers, printers, hubs, switches, and routers. object to it.
Syntax
Connect(ip, community_string)
Returns
SNMP Object.
Example
Very Simple SNMP Client that retrieves the SysName from a computer which has an SNMP server installed:
Function Main
Dim snmp1 As Object
'Carriage return and line feed
cr = Chr(13) + Chr(10)
Set snmp1 = SNMP.Connect("127.0.0.1", "public")
'OID of the sysName
Val1 = "1.3.6.1.2.1.1.5.0"
'OID of the systems Object
root = "1.3.6.1.2.1.1."
snmp1.Get Val1
echo "Oid: '"+Val1 + "'"+cr
echo "Value: '"+snmp1.Get(Val1)+"'"+cr
snmp1.Close
End Function