mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-06 03:45:26 +00:00
Reworks notifications to avoid JSON-decode to read severity
This commit is contained in:
parent
426d626331
commit
3b202121f6
19 changed files with 92 additions and 102 deletions
|
|
@ -541,7 +541,7 @@ end
|
|||
-- ##############################################
|
||||
|
||||
function alert_consts.alertLevelToSyslogLevel(v)
|
||||
return alert_severities[v].syslog_severity
|
||||
return alert_severities[alert_consts.alertSeverityRaw(v)].syslog_severity
|
||||
end
|
||||
|
||||
-- ################################################################################
|
||||
|
|
|
|||
|
|
@ -644,7 +644,7 @@ function recipients.dispatch_notification(notification, current_script)
|
|||
local is_high_priority = is_notification_high_priority(notification)
|
||||
|
||||
for _, recipient_id in pairs(recipients) do
|
||||
ntop.recipient_enqueue(recipient_id, is_high_priority, json_notification)
|
||||
ntop.recipient_enqueue(recipient_id, is_high_priority, json_notification, notification.alert_severity)
|
||||
end
|
||||
end
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue