mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Adds documentation for OO recipients and operator functions
This commit is contained in:
parent
fa00119b56
commit
34b53b8a9b
4 changed files with 31 additions and 0 deletions
|
|
@ -540,6 +540,10 @@ function alerts_api.checkThresholdAlert(params, alert_type, value)
|
|||
threshold_config.threshold
|
||||
)
|
||||
|
||||
-- Retrieve the function to be used for the threshold check.
|
||||
-- The function depends on the operator, i.e., "gt", or "lt".
|
||||
-- When there's no operator, the default "gt" function is taken from the available
|
||||
-- operation functions
|
||||
local op_fn = user_scripts.operator_functions[threshold_config.operator] or user_scripts.operator_functions.gt
|
||||
if op_fn and op_fn(value, threshold_config.threshold) then alarmed = true end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue