Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1581 from mozilla/add_tag_deadmans
Browse files Browse the repository at this point in the history
Add self describing tag for deadman alerts
  • Loading branch information
Phrozyn committed Mar 24, 2020
2 parents add9c44 + 412e5da commit 0ba71b1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion alerts/deadman.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def main(self):
# if no events found
def onNoEvent(self, hostname):
category = 'deadman'
tags = ['bro']
tags = ['bro', 'bro_deadman']
severity = 'ERROR'

summary = ('No {0} bro healthcheck events found the past 20 minutes'.format(hostname))
Expand Down
2 changes: 1 addition & 1 deletion alerts/deadman_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def process_alert(self, alert_config):
# if no events found
def onNoEvent(self, description):
category = 'deadman'
tags = ['deadman']
tags = ['deadman', 'generic_deadman']
severity = 'ERROR'

summary = "Deadman check failed for '{0}' the past {1} {2}".format(
Expand Down
2 changes: 1 addition & 1 deletion tests/alerts/test_deadman.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class TestAlertDeadman(AlertTestSuite):
"category": "deadman",
"severity": "ERROR",
"summary": 'No host1 bro healthcheck events found the past 20 minutes',
"tags": ['bro'],
"tags": ['bro', 'bro_deadman'],
}

test_cases = []
Expand Down
4 changes: 2 additions & 2 deletions tests/alerts/test_deadman_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class TestDeadmanGeneric(AlertTestSuite):
}
unmatched_first_alert = {
"category": "deadman",
"tags": ['deadman'],
"tags": ['deadman', 'generic_deadman'],
"severity": "ERROR",
"summary": 'Deadman check failed for \'Sample Alert 1\' the past 5 minutes',
}
Expand All @@ -50,7 +50,7 @@ class TestDeadmanGeneric(AlertTestSuite):
}
unmatched_second_alert = {
"category": "deadman",
"tags": ['deadman'],
"tags": ['deadman', 'generic_deadman'],
"severity": "ERROR",
"summary": 'Deadman check failed for \'Sample Alert 2\' the past 20 hours',
}
Expand Down

0 comments on commit 0ba71b1

Please sign in to comment.