elementary icon indicating copy to clipboard operation
elementary copied to clipboard

add optional --hours-back for edr monitor

Open miktros opened this issue 1 year ago • 3 comments

Add optional --hours-back for edr monitor to specify how many hours back should edr monitor look for pending alerts.

Fixes: #1548

miktros avatar Jun 06 '24 16:06 miktros

Hi @miktros I'm not sure how this PR solves the issue in question. Commented on the issue as well but I believe this will not solve your problem. If you could shed some light on it I would be happy to review. Thanks!

ellakz avatar Jun 17 '24 10:06 ellakz

By splitting data into 1-hour time buckets in volume.anomalies tests, we were hoping to be able to run dbt test and then edr monitor every hour so that alert is emitted only for a test with row count in the most recent 1-hour time bucket that is lower than past 21 day average (time bucket failure). We use the "hours-back" option, edr monitor --hours-back 1, to achieve the alerting behavior as described above. With the "days-back" option, alert is emitted each time edr monitor is run when there is a time bucket failure any time during the day, even though the most recent time bucket has no failure. In short, we want per hour alert notification that reflects failure condition of the most recent hour.

miktros avatar Jun 18 '24 22:06 miktros

If I don't add any parameter as --hours-back. It takes 1 by default. Is this true or is there any configuration that will change this?

Here is the command how to run edr monitor: edr monitor --teams-webhook<> --group-by table

Screenshot 2024-07-09 at 09 24 04

mstfkmlbsbdk2023 avatar Jul 09 '24 07:07 mstfkmlbsbdk2023