зеркало из https://github.com/mozilla/MozDef.git
Add additional logic in summary alert field
Signed-off-by: Brandon Myers <bmyers@mozilla.com>
This commit is contained in:
Родитель
b153a49111
Коммит
9a919cb114
|
@ -155,11 +155,13 @@ class AlertGenericLoader(AlertTask):
|
|||
elif 'hostname' in event_source:
|
||||
hostnames.append(event_source['hostname'])
|
||||
|
||||
summary = '{} ({}): {} [{}]'.format(
|
||||
summary = '{} ({}): {}'.format(
|
||||
aggreg['config']['summary'],
|
||||
aggreg['count'],
|
||||
aggreg['value'],
|
||||
','.join(hostnames)
|
||||
)
|
||||
|
||||
if hostnames:
|
||||
summary += ' [{}]'.format(','.join(hostnames))
|
||||
|
||||
return self.createAlertDict(summary, category, tags, aggreg['events'], severity, url)
|
||||
|
|
Загрузка…
Ссылка в новой задаче