mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-02 08:50:12 +00:00
Score computation fix (external alerts)
This commit is contained in:
parent
b4aae5d97a
commit
dbe07bbfcd
3 changed files with 18 additions and 16 deletions
|
|
@ -22,11 +22,12 @@ local script = {
|
|||
-- #################################################################
|
||||
|
||||
function script.hooks.periodicUpdate(now)
|
||||
local ext_alert_info = flow.retrieveExternalAlertInfo()
|
||||
local info_json = flow.retrieveExternalAlertInfo()
|
||||
|
||||
if(info_json ~= nil) then
|
||||
|
||||
if(ext_alert_info ~= nil) then
|
||||
-- NOTE: the same info will *not* be returned in the next periodicUpdate
|
||||
local info = json.decode(ext_alert_info)
|
||||
local info = json.decode(info_json)
|
||||
if info ~= nil then
|
||||
flow.triggerStatus(flow_consts.status_types.status_external_alert,
|
||||
info, nil, nil, nil, info.severity_id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue