Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark alerts as triggered in DB when timer > threshold_timer #73

Merged
merged 3 commits into from
Dec 24, 2016
Merged

Mark alerts as triggered in DB when timer > threshold_timer #73

merged 3 commits into from
Dec 24, 2016

Conversation

evelynleems
Copy link
Contributor

Current problem:
When citoengine receives multiple alerts of the same event within the same second, duplicated event actions are triggered.

How to replicate?

  • Create an event action.
  • Set Threshold Count to 1 and Threshold Timer to 60.
  • Use event_publisher.py to send multiple alerts to citoengine within a second.
  • You will notice the corresponding event action is triggered more than once.

Proposed Fix:

  • Reorder the if-else statement in def is_action_required(self): if self.timer > self.event_action.threshold_timer has to be the first condition.
  • Mark alert as triggered and save to database when threshold is reached (when timer exceeds configured threshold timing).

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 65.917% when pulling e458ffa on evelynleems:bugfix-alerts into 61ad642 on CitoEngine:develop.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.1%) to 65.917% when pulling da04cd7 on evelynleems:bugfix-alerts into 61ad642 on CitoEngine:develop.

@extremeunix
Copy link
Member

Fixes #73

@extremeunix
Copy link
Member

Thanks a lot @evelynleems 👍

@extremeunix extremeunix merged commit 426fd36 into CitoEngine:develop Dec 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants