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

Alert doesn't fire action if it's muted or throttled #124775

Merged
merged 4 commits into from
Feb 9, 2022

Conversation

ersin-erdal
Copy link
Contributor

@ersin-erdal ersin-erdal commented Feb 6, 2022

fixes: #124170
Task Runner was still firing actions for muted or throttled alerts if notifyWhen === 'onActionGroupChange'.
With this fix, no action will be fired if an alert is muted, throttled or notifyWhen === 'onActionGroupChange' and scheduled action group/subgroup hasn't changed.

@ersin-erdal ersin-erdal added release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Feature:Alerting/RuleActions Issues related to the Actions attached to Rules on the Alerting Framework v8.2.0 labels Feb 6, 2022
@ersin-erdal ersin-erdal marked this pull request as ready for review February 7, 2022 10:43
@ersin-erdal ersin-erdal requested a review from a team as a code owner February 7, 2022 10:43
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

Copy link
Member

@pmuellr pmuellr left a comment

Choose a reason for hiding this comment

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

LGTM; my repro listed in the original issue works as expected.

Copy link
Contributor

@ymao1 ymao1 left a comment

Choose a reason for hiding this comment

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

LGTM! Verified this works as expected. Just a comment about updating the tests to avoid test failures due to merging this PR

@ersin-erdal ersin-erdal added backport v8.1.0 auto-backport Deprecated - use backport:version if exact versions are needed and removed backport labels Feb 8, 2022
@ersin-erdal
Copy link
Contributor Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@ersin-erdal ersin-erdal merged commit e4dd6e7 into elastic:main Feb 9, 2022
@ersin-erdal ersin-erdal deleted the 124170-muted-alerts branch February 9, 2022 00:39
@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.1 Backport failed because of merge conflicts

How to fix

Re-run the backport manually:

node scripts/backport --pr 124775

Questions ?

Please refer to the Backport tool documentation

ersin-erdal added a commit to ersin-erdal/kibana that referenced this pull request Feb 10, 2022
* Alert doesn't fire action if it's muted or throttled

(cherry picked from commit e4dd6e7)

# Conflicts:
#	x-pack/plugins/alerting/server/task_runner/task_runner.ts
ersin-erdal added a commit that referenced this pull request Feb 10, 2022
* Alert doesn't fire action if it's muted or throttled

(cherry picked from commit e4dd6e7)

# Conflicts:
#	x-pack/plugins/alerting/server/task_runner/task_runner.ts

Co-authored-by: Kibana Machine <[email protected]>
@pmuellr
Copy link
Member

pmuellr commented Feb 10, 2022

The SDH that referenced this issue ^^^ asked about a backport to 7.last. I assume that's reasonable, maybe some additional type name changes? :-)

ersin-erdal added a commit to ersin-erdal/kibana that referenced this pull request Feb 11, 2022
* Alert doesn't fire action if it's muted or throttled

(cherry picked from commit e4dd6e7)

# Conflicts:
#	x-pack/plugins/alerting/server/task_runner/task_runner.test.ts
#	x-pack/plugins/alerting/server/task_runner/task_runner.ts
ersin-erdal added a commit that referenced this pull request Feb 11, 2022
* Alert doesn't fire action if it's muted or throttled

(cherry picked from commit e4dd6e7)

# Conflicts:
#	x-pack/plugins/alerting/server/task_runner/task_runner.test.ts
#	x-pack/plugins/alerting/server/task_runner/task_runner.ts

Co-authored-by: Kibana Machine <[email protected]>
ersin-erdal added a commit to ersin-erdal/kibana that referenced this pull request Feb 14, 2022
* Alert doesn't fire action if it's muted or throttled

(cherry picked from commit e4dd6e7)

# Conflicts:
#	x-pack/plugins/alerting/server/task_runner/task_runner.test.ts
#	x-pack/plugins/alerting/server/task_runner/task_runner.ts
@ersin-erdal
Copy link
Contributor Author

Manually backported to 7.17, 8.0 and 8.1

ersin-erdal added a commit that referenced this pull request Feb 14, 2022
* Alert doesn't fire action if it's muted or throttled

(cherry picked from commit e4dd6e7)

# Conflicts:
#	x-pack/plugins/alerting/server/task_runner/task_runner.test.ts
#	x-pack/plugins/alerting/server/task_runner/task_runner.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed Feature:Alerting/RuleActions Issues related to the Actions attached to Rules on the Alerting Framework release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v7.17.0 v8.0.0 v8.1.0 v8.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ResponseOps] muted alert still fires when using notifyWhen: onActionGroupChange
6 participants