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.UpdateADVAuditPollingUID - Update the settings of an Audit plugin

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’,value = lp.UpdateADVAuditPollingUID('uid', 'param', poll_interval, enable, gen_audio,  gen_report, event, level, condition, sla); 


The lp.UpdateADVAuditPolling LUA function update the settings of an Audit plugin attached to a host in the directory. If an audit with the same main identification properties already exists then only the new secondary properties are updated.


Main parameters

‘uid’                      The udi of the plugin

audit_ref            The reference number of the audit to attach

‘param’               The parameter used to initailize the audit

Secondary parameters

Poll_interval     The polling interval of the audit

enable if = 1The audit will be executed at regular interval (polling interval)

            if = 0 disable the polling

gen_audio       if = 1 notify that the audit can generate audio (Text To Speech)

if = 0 notify the audit that it should not generate audio (Text To Speech)

Warning : If the script doesn't support the otpion the setting has no effect.

gen_report       If = 1 notify that the audit can generate reports

if = 0 notify the audit that it should not generate reports

Warning : If the script doesn't support the otpion the setting has no effect.

event      The event number used by the script to generate alerts (0 = no alert)

level        The level of the event sent

condition       The condition used to generate the event.

                                   1 down

                                   2 become down

3 up

4 become up

5 no sent

Warning :      The condition 5 is used to initialise the event and its level. There will be no event sent in that case. The audit can fetch the parameter and assume the sending of the event. It will ne be sent twice in that case.

sla                 If = 1 The collected data are stored in files for further SLA calculation. The data can be used by the SLA rReport Center or by the LUA functions linked to SLA manipulation.

If = 0 There is no data collection

['title']            An optional parameter that set the title of the audit in the directory

Warning :      Warning: This parameter cannot be updated.

Return Values

‘uid’                 The UID number of the audit as unsigned 64bits coded as a character string.

value              The result of the operation, = 0 if it is a new insert or =1 if the audit already existed and has been updated.

nil                    If an error occurs


We change the polling interval of the plugin


uid1,ret=lp.InsertADVAuditPolling("",1,"param1",60,0,1,1,45000,5,1,1,"sample audit module 1");


if (uid1)then

lp.Print("Insertion = ",ret," UID ",uid1,"\n");



audit lua

The changes can be checked in the audit properties

audit lua