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: Preview recording rules in the rule editor #35699

Closed
Tracked by #63177 ...
domasx2 opened this issue Jun 15, 2021 · 7 comments · Fixed by #63260
Closed
Tracked by #63177 ...

Alerting: Preview recording rules in the rule editor #35699

domasx2 opened this issue Jun 15, 2021 · 7 comments · Fixed by #63260
Assignees
Labels
🍐-programming It's a good candidate for a pair programming session area/alerting Grafana Alerting area/frontend
Milestone

Comments

@domasx2
Copy link
Contributor

domasx2 commented Jun 15, 2021

What would you like to be added:

When editing a cortex or loki recording rule in the rule editor, it should be possible to click "preview data" and see the rule evaluation result.

@domasx2 domasx2 added this to the 8.1.0 milestone Jun 15, 2021
@domasx2 domasx2 added this to To do in Alerting frontend backlog via automation Jun 15, 2021
@wbrowne wbrowne modified the milestones: 8.1.0-beta1, 8.1.0 Jul 22, 2021
@idafurjes idafurjes modified the milestones: 8.1.0-beta3, 8.1.0 Jul 29, 2021
@wbrowne wbrowne modified the milestones: 8.1.0, 8.2.0 Aug 5, 2021
@gotjosh gotjosh moved this from To do to Inbox in Alerting frontend backlog Aug 16, 2021
@gotjosh
Copy link
Contributor

gotjosh commented Aug 16, 2021

Scope of this for 8.2 can be that we just disable the button with a toolip.

@peterholmberg peterholmberg moved this from Inbox to To do (ordered) in Alerting frontend backlog Aug 26, 2021
@andresmgot andresmgot modified the milestones: 8.2.0-beta1, 8.2.0 Sep 16, 2021
@ivanahuckova ivanahuckova modified the milestones: 8.2.0-beta2, 8.2.0 Sep 30, 2021
@peterholmberg peterholmberg modified the milestones: 8.2.0, 8.3.0 Oct 12, 2021
@peterholmberg peterholmberg removed this from the 8.3.0 milestone Nov 4, 2021
@armandgrillet armandgrillet added area/alerting Grafana Alerting and removed area/alerting/unified labels Jun 22, 2022
@gillesdemey
Copy link
Member

Closing this as a duplicate of #35699 and will follow-up there

@mellieA mellieA reopened this Dec 12, 2022
@mellieA
Copy link
Contributor

mellieA commented Dec 12, 2022

This looks like it was closed as a duplicate of itself. There are newer reports of this issue from internal/external users:

#60144
#59301

Will close the other two issues in favor of this one

@samjewell
Copy link
Contributor

Additionally to the original report here:

The same, but for Mimir / Loki RECORDING rules

What would you like to be added:

When editing a cortex or loki RECORDING rule in the rule editor, it should be possible to click "preview RULE" and see the rule evaluation result.

Why is this needed:

Grafana managed alerts have this feature, but it is currently missing for cortex/loki RECORDING RULES.

further

The UI needs a complete update for recording-rules. The button text would say "preview rule", and the alerting chain should probably be removed, as it's not relevant for recording rules.

@gillesdemey
Copy link
Member

Previewing Mimir / Cortex / Loki alerts has been implemented in #54950 previously

@gillesdemey gillesdemey changed the title Alerting: test cortex/loki rules in the rule editor Alerting: Preview recording rules in the rule editor Dec 14, 2022
@gillesdemey gillesdemey added the 🍐-programming It's a good candidate for a pair programming session label Feb 1, 2023
@gillesdemey gillesdemey added this to the 9.5.0 milestone Feb 1, 2023
@armandgrillet
Copy link
Contributor

From @VikaCep : we're explicitly excluding cloud-recording queries from preview as they don't seem to be supported. https://github.com/grafana/grafana/blob/main/public/app/features/alerting/unified/components/rule-editor/PreviewRule.tsx#L99
What is not clear to me if this is not supported because it's not implemented on the backend side (as we call the /api/v1/eval API to do it) or if it is purely frontend work that's missing. Do you know? FYI @gillesdemey

From @gillesdemey : Some initial work is being done in the alerting/preview-recording-rule branch; what we're hoping to be able to do is:

  1. Render the correct editor for any of the supported datasources
  2. Render a visualization for the time series that are being recorded in the rule by pressing the "preview" button.

We don't need expressions (since those aren't supported) and none of the usual config params are supported (no time range, no max data points, etc)

@gillesdemey
Copy link
Member

Just not supported in the Front-end, no back-end changes need to be implemented 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍐-programming It's a good candidate for a pair programming session area/alerting Grafana Alerting area/frontend
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.