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.
‘uid’ The udi of the plugin
audit_ref The reference number of the audit to attach
‘param’ The parameter used to initailize the audit
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)
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.
2 become down
4 become up
5 no sent
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
‘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("127.0.0.1",1,"param1",60,0,1,1,45000,5,1,1,"sample audit module 1");
lp.Print("Insertion = ",ret," UID ",uid1,"\n");
The changes can be checked in the audit properties