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: Use time_intervals instead of the deprecated mute_time_intervals in a… #83147

Merged
merged 11 commits into from
Feb 28, 2024

Conversation

soniaAguilarPeiron
Copy link
Member

@soniaAguilarPeiron soniaAguilarPeiron commented Feb 21, 2024

What is this feature?

This PR updates the way we use time intervals , after the the deprecation of mute_time_intervals from the alert manager config.

In this PR:

Grafana Alertmanager

Use mute_time_intervals and time_intervals when showing the UI, and save only on mute_time_intervals

External Alertmanager

  • Combine both mute_time_intervals and time_intervals when showing the UI.
  • Use time_intervals when creating new time intervals in the UI.
  • When editing an existing time interval, if it came from a mute_time_interval save it back as a mute_time_interval, and if it came from a time_interval save it back as a time_interval

Fixes part of this issue

Why do we need this feature?

#83168

Who is this feature for?

All users.

Special notes for your reviewer:

Please check that:

  • It works as expected from a user's perspective.
  • If this is a pre-GA feature, it is behind a feature toggle.
  • The docs are updated, and if this is a notable improvement, it's added to our What's New doc.

@soniaAguilarPeiron soniaAguilarPeiron added this to the 11.0.x milestone Feb 21, 2024
@soniaAguilarPeiron soniaAguilarPeiron self-assigned this Feb 21, 2024
@soniaAguilarPeiron soniaAguilarPeiron requested review from gillesdemey and konrad147 and removed request for a team February 21, 2024 09:51
@soniaAguilarPeiron
Copy link
Member Author

/deploy-to-hg

@ephemeral-instances-bot
Copy link

  • Preparing your instance. A comment containing your instance's url will be added to this PR when the instance is ready.
  • Your instance will be ready in ~10 minutes.
  • Check the GitHub actions tab to follow the workflow progress
  • Slack channel: #proj-ephemeral-hg-instances
  • Building instance with alerting/use-time-intervals-field oss branch and main enterprise branch. How to choose a branch

@grobinson-grafana
Copy link
Contributor

I think I found a bug. If there is mixed use of time_intervals and mute_time_intervals (for example, because time_intervals were created in the UI, but there are still provisioned mute_time_intervals), then the time_intervals are not shown until all mute_time_intervals are deleted:

Screenshot 2024-02-22 at 4 39 43 PM Screenshot 2024-02-22 at 4 40 02 PM

@ephemeral-instances-bot
Copy link

@soniaAguilarPeiron
Copy link
Member Author

I think I found a bug. If there is mixed use of time_intervals and mute_time_intervals (for example, because time_intervals were created in the UI, but there are still provisioned mute_time_intervals), then the time_intervals are not shown until all mute_time_intervals are deleted:

good catch! I will update the pr with this use case.

@soniaAguilarPeiron soniaAguilarPeiron marked this pull request as draft February 23, 2024 20:16
@soniaAguilarPeiron soniaAguilarPeiron marked this pull request as ready for review February 26, 2024 12:45
@grobinson-grafana
Copy link
Contributor

I tested it and LGTM! I'll let @gillesdemey and @konrad147 do the code review and approval.

@soniaAguilarPeiron soniaAguilarPeiron merged commit ed3c36b into main Feb 28, 2024
14 checks passed
@soniaAguilarPeiron soniaAguilarPeiron deleted the alerting/use-time-intervals-field branch February 28, 2024 14:21
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.

None yet

5 participants