LUALoriotPro WEB site

LoriotPro scripting documentation
Extensions for LUA language

Table of contents Search function

Print the current page Mail this  link UTUBE Channel version française

lp.GetV1

LoriotPro has extended the LUA sripting language by providing its own LUA libraries. The new functions provided are dedicated to the creation of monitoring and SNMP automation application.

Syntax

value,buffer,OID,name = lp.GetV1('ip','community','oid')

Description

Perform a SNMP GET in version 1 on the specified IP, for the specified MIB object (oid) with the specified SNMP community string.

Parameters

ip - The IP address of the Host

community - The SNMP community

oid - The MIB object

Return Values

value : the returned status

buffer : the returned value for that MIB object

OID: The object id

name: The MIB object name

Return nil if an error occurs

Example

value,buffer,oid,name = lp.GetV1("10.1.0.254","public","sysname.0")
lp.Print(value,"/",buffer,"/",oid,"/",name,"\n")

Return: 0/router26683A/1.3.6.1.2.1.1.5./sysname.0


www.loriotpro.com