Add mapScoreToSeverity call

This commit is contained in:
Alfredo Cardigliano 2021-05-05 10:40:10 +02:00
parent 4cb19a1be8
commit 24321cba24
15 changed files with 26 additions and 30 deletions

View file

@ -104,6 +104,7 @@ function slack.dequeueRecipientAlerts(recipient, budget, high_priority)
for _, json_message in ipairs(notifications) do
local notif = json.decode(json_message)
notif.severity = ntop.mapScoreToSeverity(notif.score)
if notif.entity_id then
if not alerts_by_types[notif.entity_id] then
alerts_by_types[notif.entity_id] = {}