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.
value = lp.ClearIPTrapCounter(‘ip’);
The lp.ClearIPTrapCounter LUA function performs a reset of the counter of SNMP TRAPs received by a host.
‘ip’ The IP address of the host event counter that should be reset, a character string like : ‘ xxx.xxx.xxx.xxx‘.
value 1 if the operation is successfull.
nil an error occurs (address not find in the directory).
The following example perfoms a GetIPInformation to collect the number of Traps received by a host, displays the value and then clears the counter with the ClearIPTrapCounter function.