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

#3513: TimeMuter returns the names of time intervals #3791

Merged

Conversation

grobinson-grafana
Copy link
Contributor

This commit updates the TimeMuter interface to also return the names of the time intervals that muted the alerts.

@grobinson-grafana grobinson-grafana changed the title TimeMuter returns the names of time intervals #3513: TimeMuter returns the names of time intervals Apr 3, 2024
@grobinson-grafana grobinson-grafana force-pushed the grobinson/mark-muted-alerts-1 branch 2 times, most recently from dc9cdaa to 190d201 Compare April 11, 2024 14:18
@grobinson-grafana grobinson-grafana marked this pull request as draft April 11, 2024 15:01
@grobinson-grafana grobinson-grafana marked this pull request as ready for review April 24, 2024 11:25
This commit updates the TimeMuter interface to also return the names
of the time intervals that muted the alerts.

Signed-off-by: George Robinson <[email protected]>
Signed-off-by: George Robinson <[email protected]>
@grobinson-grafana grobinson-grafana force-pushed the grobinson/mark-muted-alerts-1 branch 2 times, most recently from 4cd7d75 to cb25d60 Compare April 29, 2024 17:01
@grobinson-grafana grobinson-grafana force-pushed the grobinson/mark-muted-alerts-1 branch from cb25d60 to f2563cf Compare April 29, 2024 17:07
@@ -949,7 +949,7 @@ func (tms TimeMuteStage) Exec(ctx context.Context, l log.Logger, alerts ...*type
return ctx, alerts, nil
}

muted, err := tms.muter.Mutes(muteTimeIntervalNames, now)
muted, _, err := tms.muter.Mutes(muteTimeIntervalNames, now)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We do not have GroupMarker (added here) so there is nothing to be marked. Use the blank identifier here instead.

Copy link
Member

@gotjosh gotjosh left a comment

Choose a reason for hiding this comment

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

LGTM

timeinterval/timeinterval.go Show resolved Hide resolved
Signed-off-by: George Robinson <[email protected]>
@grobinson-grafana grobinson-grafana force-pushed the grobinson/mark-muted-alerts-1 branch from 5f8b522 to d2cbd98 Compare April 30, 2024 10:48
@gotjosh gotjosh merged commit dacbf00 into prometheus:main Apr 30, 2024
11 checks passed
TheMeier pushed a commit to TheMeier/alertmanager that referenced this pull request May 3, 2024
…theus#3791)

* TimeMuter returns the names of time intervals

This commit updates the TimeMuter interface to also return the names
of the time intervals that muted the alerts.

Signed-off-by: George Robinson <[email protected]>

---------

Signed-off-by: George Robinson <[email protected]>
@grobinson-grafana grobinson-grafana deleted the grobinson/mark-muted-alerts-1 branch June 25, 2024 15:59
TheMeier pushed a commit to TheMeier/alertmanager that referenced this pull request Sep 29, 2024
…theus#3791)

* TimeMuter returns the names of time intervals

This commit updates the TimeMuter interface to also return the names
of the time intervals that muted the alerts.

Signed-off-by: George Robinson <[email protected]>

---------

Signed-off-by: George Robinson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants