mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Adds operator function to evaluate threshold-based alerts
This commit is contained in:
parent
3fe1d98596
commit
fa00119b56
2 changed files with 13 additions and 5 deletions
|
|
@ -34,6 +34,15 @@ user_scripts.field_units = {
|
|||
syn_min = "field_units.syn_min",
|
||||
}
|
||||
|
||||
-- ##############################################
|
||||
|
||||
user_scripts.operator_functions = {
|
||||
gt --[[ greater than --]] = function(value, threshold) return value > threshold end,
|
||||
lt --[[ less than --]] = function(value, threshold) return value < threshold end,
|
||||
}
|
||||
|
||||
-- ##############################################
|
||||
|
||||
local REQUEST_PERIODIC_USER_SCRIPTS_RUN_KEY = "ntopng.cache.ifid_%i.user_scripts.request.granularity_%s"
|
||||
local NON_TRAFFIC_ELEMENT_CONF_KEY = "all"
|
||||
local NON_TRAFFIC_ELEMENT_ENTITY = "no_entity"
|
||||
|
|
@ -811,6 +820,7 @@ function user_scripts.getConfigsets()
|
|||
|
||||
-- Cache to avoid loading them again
|
||||
cached_config_sets = rv
|
||||
|
||||
return(rv)
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue