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.AckTrapFilterAction

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

  value = lp.AckTrapFilterAction(‘uid’);

Description

This function perform an acknowldege (reset) of the counter of a trap filter action. Remenber that each time that a filter matches the counter is incremented.

Parameters

uid - the uid of the filter action

Return Values

value : 1 if operation successful

Return nil if an error occurs

Example

The uid of the trap filter can be selected with

Monitor/Traps Filter Counters

1

You must check the option ‘Show all filters’

2

The UID of a filter can be see in the filter tree. The number following the Filter keyword

3

You can also insert it in you code if you are using the Loriotpro script editor.

Insert/Insert Trap Filter UID…

4

5

Example

:
 

if lp.GetTrapFilterActionInformation("5161312407770890285","a") then

       lp.Print("Number of not acked action : ",a.number_since_clear,"\n");

       lp.AckTrapFilterAction("5161312407770890285");

       lp.GetTrapFilterActionInformation("5161312407770890285","a");

       lp.Print("Number of not acked action : ",a.number_since_clear,"\n");

end

 


www.loriotpro.com