Remove metric state storing from the Alert Store
Technical Story
When receiving an alert from the Alerter the AlertStore performs the following:
- It stores the alert in
Mongo - Stores the state of the alerted metric inside Redis. This is then used by the
API/UIto display the problems in theOverview Dashboard.
Following the SRP (single responsibility principle) the AlertStore should perform one job only, that being of storing the alert in Mongo. Therefore, we need to create another component which continuously checks the values of each metric and compares them to the alertable thresholds/conditions.
In order to do this change we need to perform the following tasks:
- Remove metric state storing logic from the
AlertStore - Remove internal alerts mechanism as it would no longer be needed
- Develop the
MetricsStateStoreby integrating each monitorable in a granular way using the Strategy pattern
Description
The aim of this ticket is to remove the metric state storing logic from the AlertStore
Requirements
To achieve the aims of this ticket you need to perform the following:
- [ ] Remove the metric state storing logic from the AlertStore
- [ ] Remove any variables/constants/helper functions that are no longer being used.
- [ ] Modify the
AlertStoreunit tests accordingly
Acceptance criteria
When: An alert is raised Then: The alert is stored in MongoDB
When: An alert is raised Then: No metric state is stored in Redis
When: Checking the two acceptance criteria above
Then: There are no errors in the AlertStore logs