зеркало из https://github.com/mozilla/MozDef.git
Merge pull request #565 from mozilla/add_url_geomodel_alert
Add url to geomodel alert
This commit is contained in:
Коммит
761f16423d
|
@ -1,2 +1,3 @@
|
|||
[options]
|
||||
exclusions = user1,user2
|
||||
url = https://www.mozilla.org
|
||||
|
|
|
@ -18,7 +18,7 @@ class AlertGeomodel(AlertTask):
|
|||
MINSEVERITY = 2
|
||||
|
||||
def main(self):
|
||||
self.parse_config('geomodel.conf', ['exclusions'])
|
||||
self.parse_config('geomodel.conf', ['exclusions', 'url'])
|
||||
|
||||
search_query = SearchQuery(minutes=30)
|
||||
|
||||
|
@ -56,7 +56,7 @@ class AlertGeomodel(AlertTask):
|
|||
severity = 'WARNING'
|
||||
|
||||
summary = ev['summary']
|
||||
alert_dict = self.createAlertDict(summary, category, tags, [event], severity)
|
||||
alert_dict = self.createAlertDict(summary, category, tags, [event], severity, self.config.url)
|
||||
|
||||
if 'category' in ev['details'] and ev['details']['category'].lower() == 'newcountry':
|
||||
alert_dict['details'] = {
|
||||
|
|
|
@ -45,7 +45,8 @@ class TestAlertGeomodel(AlertTestSuite):
|
|||
},
|
||||
"principal": "ttesterson@mozilla.com",
|
||||
"source_ip": "1.2.3.4"
|
||||
}
|
||||
},
|
||||
"url": "https://www.mozilla.org",
|
||||
}
|
||||
|
||||
test_cases = []
|
||||
|
|
Загрузка…
Ссылка в новой задаче