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

Alerting: Keep legacy alert rule maxDataPoints and intervalMs during migration #71989

Merged
merged 1 commit into from
Jul 24, 2023

Conversation

JacobsonMT
Copy link
Member

@JacobsonMT JacobsonMT commented Jul 19, 2023

What is this feature?

This feature retains legacy values for maxDataPoints and min interval (intervalMs) during legacy -> UA migration.

Why do we need this feature?

Currently, the legacy migration does not retain these two fields. This means that legacy alert rules which were running with maxDataPoints=1500 and intervalMs=(some value determined by time range and 1500, approximately time range / 1500) will, after migration, run with maxDataPoints=43200 and intervalMs=1000. This has two main drawbacks:

  1. The UA query is different than the legacy query and might cause nuanced differences in results.
  2. The old query with the new limits can cause errors if requesting too much data from the datasource. For example, a legacy prometheus query running over the last 4h once migrated would result in exceeded maximum resolution of 11,000 points per timeseries.

Who is this feature for?

Users migrating from legacy to UA.

Which issue(s) does this PR fix?:

Fixes #71988

Special notes for your reviewer:

Should not be merged without #71986 as users would not be able see or edit the migrated intervalMs Merged.

@JacobsonMT JacobsonMT added this to the 10.1.x milestone Jul 19, 2023
@JacobsonMT JacobsonMT requested review from a team, rwwiv, yuri-tceretian and grobinson-grafana and removed request for a team July 19, 2023 22:10
Copy link
Contributor

@grobinson-grafana grobinson-grafana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this and can see that 1500 and min_interval are migrated to the new rule.

image

Copy link
Contributor

@yuri-tceretian yuri-tceretian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JacobsonMT JacobsonMT merged commit c7eb7fb into main Jul 24, 2023
23 checks passed
@JacobsonMT JacobsonMT deleted the jacobsonmt/migration-keep-query-resolution branch July 24, 2023 17:36
@ricky-undeadcoders ricky-undeadcoders modified the milestones: 10.1.x, 10.1.0 Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Alerting: Legacy migration does not retain maxDataPoints or intervalMs
5 participants