mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-28 23:19:33 +00:00
Fixes some ip reassignment alerts not triggering
This commit is contained in:
parent
d90fb8f8a5
commit
def8cadbca
1 changed files with 10 additions and 12 deletions
|
|
@ -2071,18 +2071,16 @@ local function processStoreAlertFromQueue(alert)
|
|||
type_info:set_severity(alert_severities.warning)
|
||||
type_info:set_subtype(string.format("%s_%s_%s", hostinfo2hostkey(router_info), alert.client_mac, alert.sender_mac))
|
||||
elseif(alert.alert_type == "mac_ip_association_change") then
|
||||
if(ntop.getPref("ntopng.prefs.ip_reassignment_alerts") == "1") then
|
||||
local name = getDeviceName(alert.new_mac)
|
||||
entity_info = alerts_api.macEntity(alert.new_mac)
|
||||
type_info = alert_consts.alert_types.alert_mac_ip_association_change.new(
|
||||
name,
|
||||
alert.ip,
|
||||
alert.old_mac,
|
||||
alert.new_mac
|
||||
)
|
||||
type_info:set_severity(alert_severities.warning)
|
||||
type_info:set_subtype(string.format("%s_%s_%s", alert.ip, alert.old_mac, alert.new_mac))
|
||||
end
|
||||
local name = getDeviceName(alert.new_mac)
|
||||
entity_info = alerts_api.macEntity(alert.new_mac)
|
||||
type_info = alert_consts.alert_types.alert_mac_ip_association_change.new(
|
||||
name,
|
||||
alert.ip,
|
||||
alert.old_mac,
|
||||
alert.new_mac
|
||||
)
|
||||
type_info:set_severity(alert_severities.warning)
|
||||
type_info:set_subtype(string.format("%s_%s_%s", alert.ip, alert.old_mac, alert.new_mac))
|
||||
elseif(alert.alert_type == "login_failed") then
|
||||
entity_info = alerts_api.userEntity(alert.user)
|
||||
type_info = alert_consts.alert_types.alert_login_failed.new()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue