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.SetADVAuditPollingUID - Modify the properties 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.

Syntax

‘uid’,value = lp.SetADVAuditPollingUID('uid',option,'value');

Description

The lp.InsertADVAuditPolling LUA function modifies the properties of an Audit plugin attached to a host in the directory.

Parameters

‘uid’              The UID of the audit plugin to modify

option  The number of the option to modify

The list of available otpion is defined in the /bin/config/loriotinit.lua file

This one can be added in a script with the command in the beginning of the script

dofile(lp.GetPath().."/config/script/loriotinit.lua");

LP_LUA_ADV_POLLING_INTERVAL = 43

LP_LUA_ADV_EVENT_REF       = 44

LP_LUA_ADV_EVENT_LEVEL     = 45

LP_LUA_ADV_CONDITION       = 46

LP_LUA_ADV_ENABLE   = 47

LP_LUA_ADV_AUDIO_GENERATE = 48

LP_LUA_ADV_REPORT_GENERATE = 49

LP_LUA_ADV_SLA      = 50

LP_LUA_ADV_TITLE    = 51

LP_LUA_ADV_PARAM    = 52

LP_LUA_ADV_AUDIT_NUMBER = 54

‘value’ The new value of the option

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

Example

lua logoLoriotPro WEB site Documentation scripting LoriotPro
Extensions du language LUA

Table des matières    Liste de fonctions

Imprimer la page en cours Mail this  link UTUBE Channel

We will modify the properties of the following Audit.

adv audit

The LUA code

--[[

LP_LUA_ADV_POLLING_INTERVAL = 43

LP_LUA_ADV_EVENT_REF       = 44

LP_LUA_ADV_EVENT_LEVEL     = 45

LP_LUA_ADV_CONDITION       = 46

LP_LUA_ADV_ENABLE   = 47

LP_LUA_ADV_AUDIO_GENERATE = 48

LP_LUA_ADV_REPORT_GENERATE = 49

LP_LUA_ADV_SLA      = 50

LP_LUA_ADV_TITLE    = 51

LP_LUA_ADV_PARAM    = 52

LP_LUA_ADV_AUDIT_NUMBER = 54

]]--

 

dofile(lp.GetPath().."/config/script/loriotinit.lua");

 

lp.SetADVAuditPollingUID('5169471514193428618',LP_LUA_ADV_POLLING_INTERVAL,'15');

lp.SetADVAuditPollingUID('5169471514193428618',LP_LUA_ADV_EVENT_REF,'8999');

lp.SetADVAuditPollingUID('5169471514193428618',LP_LUA_ADV_EVENT_LEVEL,'4');

lp.SetADVAuditPollingUID('5169471514193428618',LP_LUA_ADV_PARAM,'new param');

lp.SetADVAuditPollingUID('5169471514193428618',LP_LUA_ADV_CONDITION,LP_LUA_ADV_CONDITION_NOSENT);

 The plugin with its new parameter

adv audit

 

 

 


www.loriotpro.com