mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 23:49:33 +00:00
Match SNMP devices when sending notifications to recipients
This commit is contained in:
parent
c873ec3cf5
commit
7d4cc0adcc
1 changed files with 7 additions and 0 deletions
|
|
@ -27,11 +27,18 @@ function pools_alert_utils.get_host_pool_id(entity_info)
|
|||
return nil
|
||||
end
|
||||
|
||||
-- Active Monitoring alert to Host
|
||||
if alert_entity == alert_entities.am_host then
|
||||
local am_host_info = split(pool_member, "@")
|
||||
if #am_host_info == 2 then
|
||||
pool_member = am_host_info[2]
|
||||
end
|
||||
-- SNMP alert to Host
|
||||
elseif alert_entity == alert_entities.snmp_device then
|
||||
local snmp_device_info = split(pool_member, "_")
|
||||
if #snmp_device_info >= 1 then
|
||||
pool_member = snmp_device_info[1]
|
||||
end
|
||||
else
|
||||
-- Host pool not supported (note: flow and host alerts are set in C)
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue