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: update panel alert tab #33850

Merged
merged 14 commits into from
May 17, 2021
Merged

Alerting: update panel alert tab #33850

merged 14 commits into from
May 17, 2021

Conversation

domasx2
Copy link
Contributor

@domasx2 domasx2 commented May 10, 2021

What this PR does / why we need it:

  • Reworked pamel alerts tab for unified alerting. Shows alert rules that match the panel either by dashboard & panel id annotations or by panel URL annotation. Has a button that takes you to rule form pre-filled with queries, rule name and folder from the panel
  • Possible to provide default values to rule form via URL defaultValues query param. Expects JSON with form values
  • Possible to specify where the rule form should return to on "Cancel" or "Save and exit" with returnTo query param.
  • More suggested annotation options
  • Alert threshold not shown on the graph for unified alerting. Currently don't have an easy way to calculate this threshold. Will liekly be revisited later
  • Condition field in rule form automatically selects the last expression if one exists
  • Some annotations in rule/alert details show "readable" name with tooltip for the real key. This is somewhat odd, might need more thinking about in the future. Real key is important as that's what you'd use in a template

TODO:

  • remove the dasboard_url and panel_url annotations, these are to be generated at runtime. Not quite sure how to link existing rules to panels though.. perhaps that's not needed
panel.alerts.mp4

Which issue(s) this PR fixes:

Fixes https://github.com/grafana/alerting-squad/issues/9
Fixes https://github.com/grafana/alerting-squad/issues/141
Fixes https://github.com/grafana/alerting-squad/issues/110

Special notes for your reviewer:

I went with an odd way to get the number of rules into panel alerting tab. Better ideas are welcome!

Does anything else need to be modified?

@domasx2 domasx2 requested review from torkelo, a team and mckn and removed request for a team May 10, 2021 13:32
@domasx2 domasx2 force-pushed the domas/panel-alert-tab branch 2 times, most recently from df34d04 to a8a17ba Compare May 13, 2021 07:33
Copy link
Contributor

@nathanrodman nathanrodman left a comment

Choose a reason for hiding this comment

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

Great work! It's pretty seemless going from panel to alert rule creation, and the navigation back to the panel from the rule list is awesome.

@domasx2 domasx2 added the old backport v8.0.x Mark PR for automatic backport to v8.0.x label May 14, 2021
@domasx2 domasx2 requested review from a team and peterholmberg May 14, 2021 08:37
@domasx2 domasx2 added this to the 8.0.0-beta2 milestone May 14, 2021
@domasx2 domasx2 added this to In Review (max. internal 8, external 3) in Frontend Platform Backlog via automation May 14, 2021
Copy link
Contributor

@bfmatei bfmatei left a comment

Choose a reason for hiding this comment

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

Just some super minor nitpicks

@domasx2 domasx2 merged commit a26507e into main May 17, 2021
Frontend Platform Backlog automation moved this from In Review (max. internal 8, external 3) to Done May 17, 2021
@domasx2 domasx2 deleted the domas/panel-alert-tab branch May 17, 2021 07:39
grafanabot pushed a commit that referenced this pull request May 17, 2021
domasx2 added a commit that referenced this pull request May 17, 2021
(cherry picked from commit a26507e)

Co-authored-by: Domas <domasx2@gmail.com>
ryantxu pushed a commit that referenced this pull request May 18, 2021
mortenaa pushed a commit to mortenaa/grafana that referenced this pull request May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/frontend old backport v8.0.x Mark PR for automatic backport to v8.0.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants