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

[v10.0.x] Alerting: Convert 'Both' type Prometheus queries to 'Range' in migration #70854

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

grafana-delivery-bot[bot]
Copy link
Contributor

Backport 00d5f7f from #70781


What is this feature?

This feature updates the legacy migration to convert Prometheus queries of type Both to type Range and log a warning during migration.

Why do we need this feature?

Legacy supports alerting on Prometheus queries of type Both. This returns a mixed response with two dataframes (TimeSeriesWide & NumericWide), however Server Side Expressions and UA does not currently support this type of mixed response.

Who is this feature for?

Users of legacy alerting who will be migrating to UA.

Which issue(s) does this PR fix?:

Fixes #70768

Special notes for your reviewer:

There is the possibility to better support migrating this functionality by:

  • Splitting the query into two: one for instant and one for range.
  • Splitting the condition into two: one for each query, separated by OR.

However, relying on a Both query instead of multiple conditions to do this in legacy is likely
to be unintentional. In addition, this would require more robust operator precedence in classic conditions.
Given these reasons, we opt to convert them to Range queries and log a warning.

Please check that:

…ion (#70781)

* Alerting: Convert 'Both' type Prometheus queries to 'Range' in migration

(cherry picked from commit 00d5f7f)
@grafana-delivery-bot grafana-delivery-bot bot requested a review from a team June 28, 2023 18:04
@grafana-delivery-bot grafana-delivery-bot bot added this to the 10.0.x milestone Jun 28, 2023
@grafana-delivery-bot grafana-delivery-bot bot added add to changelog area/alerting Grafana Alerting area/backend area/backend/db/migration backport A backport PR type/bug type/docs Flags the technical writing team for documentation support; auto adds to org-wide docs project labels Jun 28, 2023
@grafanabot grafanabot added the pr/external This PR is from external contributor label Jun 28, 2023
@JacobsonMT JacobsonMT removed the pr/external This PR is from external contributor label Jun 28, 2023
@JacobsonMT JacobsonMT merged commit b2d43de into v10.0.x Jun 28, 2023
@JacobsonMT JacobsonMT deleted the backport-70781-to-v10.0.x branch June 28, 2023 20:31
@zerok zerok modified the milestones: 10.0.x, 10.0.2 Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add to changelog area/alerting Grafana Alerting area/backend/db/migration area/backend backport A backport PR type/bug type/docs Flags the technical writing team for documentation support; auto adds to org-wide docs project
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants