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.FindName - Search directory by host name

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.


"uid" = lp.FindName("name");


Search into the loriotpro directory and get the first object with the specified name and return its UID


"name" - A character string with the name to search for (not case sensitive).

Return Values

UID - The UID of the object or nil


We check that the UID with the name "Google" exist before running the script and check it.

Find Name LUA

Find Name LUA

Script code

if uid then lp.Print('found uid ',uid,"\n") end


if uid then lp.Print('found uid ',uid,"\n") end


if uid then lp.Print('found uid ',uid,"\n") end

Find Name LUA

 The two first requests works because the function is not case sensitive, thus the third one doesn't work.

Warning  ! If there is multiple object in the LoriotPro Directory with the same name, The retruned UID is alway the one of the first object found.