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

[FEATURE] thresholds on alerts in the specific metric #413

Open
suelai opened this issue Dec 5, 2023 · 0 comments · May be fixed by re-data/dbt-re-data#125
Open

[FEATURE] thresholds on alerts in the specific metric #413

suelai opened this issue Dec 5, 2023 · 0 comments · May be fixed by re-data/dbt-re-data#125

Comments

@suelai
Copy link
Contributor

suelai commented Dec 5, 2023

Tell us about the problem you're trying to solve

Have an absolute or a relative threshold to trigger the alert. Right now, using z_score or the rest of the anomaly metrics might not be always meaningful. For example, if freshness is usually 2 minutes and today's data shows a freshness of 2 hours, then, even though this is a big anomaly, we only would like to be alerted after 4 hours. Thus, there should be possible to put the value of 4 hours as an upper bound, together with the anomaly detection
Similarly, the alerts message show a percentage increase or decrease, which should also be an input for different columns to be able to react to the alerts and put a lower or upper bound.

Describe the solution you’d like
In this example, the sum for the amount should only alert the upper bound hits 1000, even though in terms of z_score it could already go over 3. Similarly, we can express this as percentage_upper_bound = 0.3 so only when it gets 30% higher.

models:
  - name: pending_orders
    config:
      re_data_monitored: true
      re_data_time_filter: created_at
      re_data_columns:
        - amount
        - status
      re_data_metrics_groups:
        - table_metrics
      re_data_metrics:
        column:
          amount:
            - sum:
               upper_bound: 1000
      re_data_anomaly_detector:
        name: modified_z_score
        threshold: 3

Describe the alternative you’ve considered or used
I have replaced the re_data_alerts with my own model so I could write my own filters

@suelai suelai changed the title [FEATURE] [FEATURE] thresholds on alerts in the specific metric Dec 5, 2023
@suelai suelai linked a pull request Dec 27, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant