Simplifies host callbacks lua structure with callback_definitions/host

This commit is contained in:
Simone Mainardi 2021-04-13 10:53:15 +02:00
parent 9d2bd43bd8
commit c0ad0ff162
24 changed files with 309 additions and 453 deletions

View file

@ -0,0 +1,36 @@
--
-- (C) 2019-21 - ntop.org
--
local user_scripts = require("user_scripts")
local alert_severities = require "alert_severities"
-- #################################################################
local flow_flood = {
-- Script category
category = user_scripts.script_categories.security,
default_enabled = false,
default_value = {
-- "> 50"
operator = "gt",
threshold = 256,
severity = alert_severities.error,
},
gui = {
i18n_title = "entity_thresholds.flow_flood_title",
i18n_description = "entity_thresholds.flow_flood_description",
i18n_field_unit = user_scripts.field_units.flow_sec,
input_builder = "threshold_cross",
field_max = 65535,
field_min = 1,
field_operator = "gt";
}
}
-- #################################################################
return flow_flood