Fixes IEC alerts triggered even when disabled (#6682)

This commit is contained in:
MatteoBiscosi 2022-07-19 11:11:07 +02:00
parent 77c80a0190
commit 687d508daa
6 changed files with 65 additions and 23 deletions

View file

@ -3,9 +3,8 @@
--
local checks = require("checks")
local alerts_api = require("alerts_api")
local alert_consts = require("alert_consts")
local flow_alert_keys = require "flow_alert_keys"
local CHECKS_IEC_INVALID_TRANSITION = "ntopng.checks.iec104_invalid_transition_enabled"
-- #################################################################
@ -30,4 +29,16 @@ local script = {
-- #################################################################
function script.onEnable()
ntop.setCache(CHECKS_IEC_INVALID_TRANSITION, "1")
end
-- #################################################################
function script.onDisable()
ntop.setCache(CHECKS_IEC_INVALID_TRANSITION, "0")
end
-- #################################################################
return script