зеркало из https://github.com/mozilla/MozDef.git
Filtered out INFO and NOTICE severity alerts fro displaying
This commit is contained in:
Родитель
ded22e02a8
Коммит
91884f169e
|
@ -327,7 +327,14 @@ class alertConsumer(ConsumerMixin):
|
|||
if len(bodyDict['summary']) > 450:
|
||||
sys.stdout.write('alert is more than 450 bytes, truncating\n')
|
||||
bodyDict['summary'] = bodyDict['summary'][:450] + ' truncated...'
|
||||
self.ircBot.client.msg(ircchannel, formatAlert(bodyDict))
|
||||
|
||||
#if the alert has a 'severity', only publish the alert if the severity is not NOTICE or INFO
|
||||
if 'severity' in bodyDict.keys():
|
||||
if not ((bodyDict['severity'] == 'NOTICE') or (bodyDict['severity'] == 'INFO')):
|
||||
self.ircBot.client.msg(ircchannel, formatAlert(bodyDict))
|
||||
#if the alert does not have a severity for some reason, go ahead and publish it
|
||||
else
|
||||
self.ircBot.client.msg(ircchannel, formatAlert(bodyDict))
|
||||
|
||||
message.ack()
|
||||
except ValueError as e:
|
||||
|
|
Загрузка…
Ссылка в новой задаче