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

Using Global Object within the LoriotPro NMS software, a case study

The goal of this case study is to create a MAP of a wide area network displaying the current status of all the network interfaces of the routers. For that, we will use one of the new features of LoriotPro version 7: the Global Objects.

Global objects (GO) in our management software solution LoriotPro network can represent any indicators of status or performance of your IT infrastructure. They can be for example an interface status, a disk space, a running status, a temperature, GPS coordinates…

Global Objects are used as an internal repository for LoriotPro for storing everything that you want to monitor. This repository can be distributed among multiple LoriotPro to provide redundancy and/or load sharing. They have the huge advantage of being present in memory and not on disk and thus offers to Loriotpro a processing capacity down to the second of thousands of indicators. In this study we use a single LoriotPro so we will not have the notion of redundancy or distribution of data collections.

Here to start, the final network diagram that we want to achieve in this case study.

AV&GlobalObjects.png RouterSpace.png
The network covers four countries, including France, Australia, Brazil and Japan. Sites in these countries are interconnected by point to point links that build our Wide Area Network (WAN). Each site has a LAN and a WAN access router. The MAP is built with a background image imported from Microsoft Visio and some graphical objects have been added to display the current status (color and text) of the network interfaces.

Before diving into the configuration steps, let’s review the principle of the monitoring of SNMP devices and the Global Object concepts. 

The components of the architecture are presented in the diagram below:


On the left side the routers on which SNMP data collections are performed.

On the right side, the  MAP which should reflect as quickly as possible the working status of the network interfaces.

In between, there is the Global Object containing the current values ​​of SNMP collected indicators.

At the top of that, there are the Audits. Audits are kind of workers that are constantly looking for tasks to perform. Tasks are scripted LUA function defined in the Global Object and responsible of data collection and data correlation. Audits are in real time looking for Global Objects that have to be updated (time interval of their script execution elapsed).

The Global Object LUA function describes how to programmatically perform the collect on the device but not only (cf. correlation) stored in the corresponding GLOBAL OBJECTS.

The ActiveView dashboards for their part have their own data collection internal process that gathers at regular interval the current values of the GLOBAL OBJECTS. Depending on the returned values of the Global Object, graphic objects are modified (background color, text, position, clipart, etc..) to notify the administrator of a state change.

Now proceed with the implementation

We must first define the necessary Global Object. In our example we have routers, routers are located in different countries, and they have network interfaces.

We must identify the SNMP indicator that will allow us to know the operating status of the router’s interfaces. Here we use the standard object ifOperStatus available in the MIB2.

Object Name          : [ ifOperStatus ]

Children of Object   : [ ifEntry ]

From MIB Description : [ IF-MIB ]

Registered in File   : [ IF-MIB-200006140000Z-rfc2863.mib ]

MIB File Directory   : [ C:\LORIOT~3\LO1363~1\bin/mibs/0_MIB_KERNEL ]

The File is loaded


Father Indexed By    :

                       [ IfIndex,INTEGER(6) ]



 INTEGER Sequence    :

                       [ up(1)]

                       [ down(2)]

                       [ testing(3)]

                       [ unknown(4)]

                       [ dormant(5)]

                       [ notPresent(6)]

                       [ lowerLayerDown(7)]





OID LEN (10) :


LoriotPro Extentions :

Dup name found: 0 IOD Marked Deleted : 0

Flag: 1 Flagof: 0 Locked: 0

OID_len: 11 OID Pointer: 173958560




"The current operational state of the interface.  The testing(3) state indicates that no operational packets can be passed.  If ifAdminStatus is down(2) then ifOperStatus should be down(2).  If ifAdminStatus is changed to up(1) then ifOperStatus should change to up(1) if the interface is ready to transmit and receive network traffic; it should change to dormant(5) if the interface is waiting for

external actions (such as a serial line waiting for an incoming connection); it should remain in the down(2) state if and only if there is a fault that prevents it from going to the up(1) state; it should remain in the notPresent(6) state if the interface has missing (typically, hardware)



For a simple naming convention is defined:

Example: RTR-FRA-1 IF1 for interface 1 of the router located in France  

The first step is to create the Global Objects. To access the environment for Global Objects creation, select the Configure -> Global Object from the main menu.

The Global Object Monitor window opens:

Click New, the following window opens:

You enter the name of our Global Object respecting our naming convention.

The property window of a Global Object appears.


First we will create a group called WAN that will serve us better then distribute processing audit process.

This group aims to bring together all the available indicators for monitoring the WAN.

You enter the value in the Group Name field and then click Edit Group Scheduler function

The following window appears:

GO groupe scheduler function

This is a LUA script that we will save as is closing the window. This script is used by a central process for dealing with GO functionin this group.

Then we set the two values ​​for Pram 1 and Param2

These values ​​will be used as arguments to the GO LUA function.

In our context we decided that Param 1 should contain the IP address of the router and Param 2 the SNMP ifoperstatus object and its index.

The value of the Schedule field is then changed to the value 1, indicating that the object is to be treated by one or audit process.

Then click the button Edit Global Object LUA function. The LUA LoriotPro editor opens with the attached function.

This function is empty, it is necessary to add the code to support the SNMP collection and return the values ​​collected in the Global Object variables (String, Double,Status).

Here is the code achieving these objectives:


function func_RTR_AUS_IF0_OperStatus (var)


            if HostInfo.status == 2 then


                        if SNMPval ~= nil then

                                   lp.SetGObjectString(,SNMPbuf) -- Global Object String variable

                                   lp.SetGObjectDouble(,SNMPval)-- Global Object Double variable

                                   lp.SetGObjectStatus(,1)-- Global Object Status variable


                                   lp.SetGObjectString(,"SNMP Error")





                        lp.SetGObjectString(,"Not SNMP")






This function performs the following tasks:
  1. Collection of the router status in the  LoriotPro directory (blue,green red)
  2. Test of the status, if the equipment answers to SNMP queries (green status, value = 2) we continue, else we quit and fill the Global Object values ​​(String, double, status) with error and 0.
  3. Collecting of the SNMP object passed as an argument in Param 2 to the function
  4. If the SNMP collection went well, we enriched String, Double and Status variables with these values, ​​else we leave with values ​​0
  5. we leave

As this function is used by the Global Object representing interface status we can externalize the code. This will prevent us to systematically create this code for all objects and will be easier to maintain.

We replace all our code with a simple line that calls an external file Getifoperstatus.lua. The CompanyScripts directory was created for storing our own scripts.

function func_RTR_FRA_IF0_OperStatus (var)

Leaving the development environment by saving the file.

You should now have a window similar:

The default interval (Interval field) must be specified, it sets the frequency at which the function must be executed by / the Audits.

Choose the highest possible value, but that fits to your needs.  This value should be higher than the interval of the Audit(s) 902 that manage the Global Object Group.

For the persistence of Global Object, ie find its configuration must restart AutoLoad box and click on Apply and then Save.

As we use an external script, it must be created.

In the path specified we need to create this file and add the generic code created earlier.

Get ifoperstatus script

The Global Object is now created. We repeat the same steps for all the interfaces of all routers.

There is also the possibility of creating the Global Object by LUA scripts. It is more convenient when the amount of GO to create is important, but we will not discuss this topic in this document.

The next step is to add Audits to the LoriotPro directory. We usually add them under the LoriotPro object.

Call the context menu of the LoriotPro object, then select Insert Task -> Advanced TCP / AUDIT

The Audit Configuration window opens, select Audit Process

Default run interval is 60 seconds. This value must be lower in all cases than the interval defined in the properties of the Global Object.

We are positioning to 5 seconds as the value of Interval Global Object is 15 seconds.

time interval setting

Then call the wizard and select the 902 script or enter the value 902 in Ref Audit and the name of the group in Parameters

A second audit may be added in exactly the same way to distribute the work between two separate processes (thread).

Depending of the workload you can extend the number of Audit attached to a Group. This is where this innovative concept for scalability, takes its worth.

Once that is finished, we see that in our directory 2 Audits are present.

Not against they may be purple and not in green status. This indicates that the Audit Process background task is not started.

From the main menu, then select Configure -> Audit Process, click Start to start it.

Audits go green, it is also possible to rename them to better identify them.


If we open our Global Object monitor we find that they are updated regularly.

In addition to the GO that we created, we can 2 GO starting by Thread. These are automatically created for each Audit present in the directory; the number refers to the UID of the Audit.
A click on the GO selects the Audit plugin objet in the directory.

We can now create the map to view the state of our WAN links.

Add an Active View in the directory. Select the object LoriotPro and then the contextual menu and then select Insert Task -> Active View.

After adding the background Map we can create the graphic objects relative to our Global Objects.

To add interface status box we use the Outlined Text graphical object that we drag an drop on the map. Then we edit its properties.

We select the Dynamic Aspect tab to set the behavior of the graphical object (its background color should reflect the router interface status)


Check the boxes "Activate Dynamic Aspect" and "Fill Text Object" as in our example

In the Wizard, select the Get Global Object option. (Get Global value in older Version)

Then you can enter the name of the Global Object or call the Wizard to select it.

The rules of coloring the graphic object is then added, here is resumed exactly what the SNMP ifOperStatus object return and the case of the router is not responding to SNMP.

Possible values : up, down, testing, unknown, sleeping, notPresent, lowerLayerDown, SNMP error, Not SNMP

Coloring rules can be saved in the "template" files with the extension .cte to be reused when configuring other graphic objects in Active View.

Here under the ifoperstatus.cte file containing rules coloring

object filter 0 "up" 8454016 0 1 16777343 0 "(null)" 0
object filter 0 "testing" 33023 0 1 16777343 0 "(null)" 0
object filter 0 "down" 255 0 1 16777343 0 "(null)" 0
object filter 0 "unknown" 16744703 0 1 0 0 "(null)" 0
object filter 0 "notPresent" 16777088 0 1 0 0 "(null)" 0
object filter 0 "lowerLayerDown" 255 0 1 0 0 "(null)" 0
object filter 0 "SNMP error" 65535 0 1 0 0 "(null)" 0
object filter 0 "Not SNMP" 8454143 0 1 0 0 "(null)" 0

The operation is repeated for each router interface in our map.

The map when finished displays the status of our interfaces. If an interface goes down the MAP will display it in the next 15 seconds. This convergence, if required, can be reduce to the second, but keep in mind that behind, SNMP packets have to be exchanged with the routers.


We completed this case study on the implementation of Global Object within LoritoPro. The Global Object concept introduces a separation between the data collection, whether they are SNMP or not, and their usage, as in our example here in Active View display. This logic can handle very large amounts of collections with intervals that can go down to second, on equipments where response times are highly variable.