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.GetIPValues

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 = lp.GetIPValues("IP-Address","LUA-Table")

Description

Retrieve a LUA table of string values attached to a specific host of the Loriotpro directory. The variables can be set with the lp.SetIPOtpion function (see example below).

Parameters

IP-Address: The ip address of a host defined in the LoriotPro directory

LUA-Table: A lua table with the 10 variables

Return Values

value : 1 if succeeded

Return nil if an error occurs

Example

dofile(lp.GetPath().."/config/script/loriotinit.lua");
lp.SetIPOption("10.1.0.254",LP_LUA_VALUE_7,"Test")

lp.GetIPValues("10.1.0.254","LuaTable")
for key,value in pairs(LuaTable) do
lp.Print(key,'="',value,'";\n')
end

example of return:

value_8="";
value_6="";
value_5="";
value_2="";
value_9="";
value_4="";
value_7="Test";
value_1="";
value_3="";
value_0="";


www.loriotpro.com