mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-06 03:45:26 +00:00
Extend key for external alertable to avoid conflicts with different alerts
This commit is contained in:
parent
6cf11e0e21
commit
16e090549d
5 changed files with 30 additions and 8 deletions
|
|
@ -181,6 +181,12 @@ end
|
|||
|
||||
-- ##############################################
|
||||
|
||||
function Alert:get_subtype()
|
||||
return self.subtype
|
||||
end
|
||||
|
||||
-- ##############################################
|
||||
|
||||
function Alert:set_granularity(granularity)
|
||||
self.granularity = alert_granularities[granularity]
|
||||
if (self.granularity == nil) then
|
||||
|
|
|
|||
|
|
@ -372,8 +372,9 @@ function alerts_api.trigger(entity_info, type_info, when, cur_alerts)
|
|||
triggered = network.storeTriggeredAlert(table.unpack(params))
|
||||
end
|
||||
else
|
||||
triggered = interface.triggerExternalAlert(entity_info.alert_entity.entity_id, entity_info.entity_val,
|
||||
table.unpack(params))
|
||||
local key = string.format("%s_%s_%s", entity_info.entity_val, type_info.alert_type.alert_key, subtype)
|
||||
|
||||
triggered = interface.triggerExternalAlert(entity_info.alert_entity.entity_id, entity_info.entity_val, key, table.unpack(params))
|
||||
end
|
||||
|
||||
if (triggered == nil) then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue