This repository was archived by the owner on Sep 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 85
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
added disclaimer for consolidated alerts reports
- Alerts do not consider subdim level anomalies now - The TriggeredAlerts query for reports is now changed to use the anomaly timestamp and look for today-DAYS_OFFSET_FOR_ANALTYICS data - Because of the above change, we need to ensure that there is only one day's data in a particular TriggeredAlerts row (since we only look for the first data point in a TriggeredAlerts row when querying).
Instead of splitting only during TriggeredAlerts storage time, split before doing anything with the data. So separate alerts are sent and separate rows of TriggeredAlerts are used for different days.
Previous point is used for both daily and hourly time series frequency
also changed previous_value to be rounded to 2 decimals
Moved the data_datetime filter thing to a function
Since doing in the backend means the dashboard only gets data of that day.
All day's TriggeredAlerts data is stored, but only the latest day's data is used for sending alerts. This prevents a spam of alerts if a user had shutdown CG for a while and then started it up.
The CLI now allows specifying last_anomaly_timestamp to make testing easier. Since alerts is stateful, it would have required updating the DB everytime to trigger an alert.
Issues fixed: - The previous data used in previous point calculation was (last_anomaly_timestamp - 1day) which doesn't include the previous point in case of an hourly KPI. - The format function was called on all the points before segregation which means that it could have multiple days of data. So it was possible that (last_anomaly_timestamp - 1days) did not include the previous point for points that are older than 1 day. The whole logic was wrong if there were multiple days of data!
Changed made according to requirements. Non-html changes: - Added a few property fields to AnomalyPointFormatted that are used in the format - Added `is_hourly` to AnomalyPointFormatted (could not be a computed property since we don't store the TS frequency in AnomalyPointFormatted). - Passed date (of anomaly) to _send_email_alert to be used in the summary section - The same needs to be done for slack
✅ Deploy Preview for frontend-sb canceled.
|
Enable subdims only for storing in triggered alerts (to be displayed on dashboard), but do not consider it for individual and report alerts.
Was coming as "None"
Also increases the width of all alerts.
Common HTML code now resides in jinja macros in `common.html` Also fixed a bug in alerts dashboard.
…_genius into feature/alerts-revamp
Co-authored-by: Amatullah <[email protected]>
Also removed one unnecessary import
Samyak2
commented
Jun 6, 2022
Samyak2
commented
Jun 6, 2022
the whole of previous day data was not necessary. it could be a lot of data depending on the subdims.
simplifies some code
Amatullah
approved these changes
Jun 7, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Tasks: