Skip to content

[RAM] Add aggs to know how many rules are snoozed#128212

Merged
XavierM merged 12 commits intoelastic:mainfrom
XavierM:add_aggregate_snoozed_api
Mar 24, 2022
Merged

[RAM] Add aggs to know how many rules are snoozed#128212
XavierM merged 12 commits intoelastic:mainfrom
XavierM:add_aggregate_snoozed_api

Conversation

@XavierM
Copy link
Copy Markdown
Contributor

@XavierM XavierM commented Mar 21, 2022

Summary

Add aggregation to know how may rules are snoozed, this will allow us to resolve #126498

Checklist

  • Documentation was added for features that require explanation or tutorials

@XavierM XavierM added release_note:enhancement Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// v8.2.0 backport:skip This PR does not require backporting labels Mar 21, 2022
/>,
<EuiStat
title={ruleStats.muted}
title={ruleStats.muted + ruleStats.snoozed}
Copy link
Copy Markdown
Contributor

@mgiota mgiota Mar 22, 2022

Choose a reason for hiding this comment

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

@XavierM I would like to see this PR merged #128108 where we implemented the snoozed status (and update the muteAll field) and do a bit of manual testing to see if these numbers work well.

I am just writing the scenarios I would like to test once both PRs are merged:
Scenario 1

  • User in Stack Management selects snooze for a specified timerange for one rule. (The muteAll field I guess will be false in this case, right?)
  • In o11y rules page status for this rule will appear as enabled and not snoozed permanently
  • In Alerts page there will be 1 Snoozed alert

Scenario 2

  • User in Stack Management selects snooze for a specified timerange for one rule.
  • In o11y rules page status for this rule will appear as enabled
  • In o11y rules page user selects Snoozed permanently for another rule
  • In Alerts page there will be 2 Snoozed alerts (the one from stack Management ruleStats.snoozed and the other from o11y rules page ruleStats.muted)

<EuiStat
title={ruleStats.muted}
title={ruleStats.muted + ruleStats.snoozed}
description={i18n.translate('xpack.observability.alerts.ruleStats.muted', {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@XavierM Shall we make it explicit in the name that it contains muted and snoozed xpack.observability.alerts.ruleStats.mutedAndSnoozed?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't mind keeping it as it is either.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

let's keep it like that for now because this is going to change again in the next release meaning muted will become deprecated sooner than later.

@XavierM XavierM marked this pull request as ready for review March 23, 2022 17:03
@XavierM XavierM requested a review from a team as a code owner March 23, 2022 17:03
@XavierM XavierM requested a review from a team March 23, 2022 17:03
@elasticmachine
Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

@chrisronline chrisronline left a comment

Choose a reason for hiding this comment

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

First pass, and looking good!

Comment thread x-pack/test/alerting_api_integration/spaces_only/tests/alerting/index.ts Outdated
Comment thread x-pack/test/alerting_api_integration/spaces_only/tests/index.ts Outdated
Comment thread x-pack/plugins/alerting/server/rules_client/rules_client.ts
@kibana-ci
Copy link
Copy Markdown

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
alerting 292 293 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
observability 415.9KB 416.0KB +69.0B
Unknown metric groups

API count

id before after diff
alerting 300 301 +1

History

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

Copy link
Copy Markdown
Contributor

@chrisronline chrisronline left a comment

Choose a reason for hiding this comment

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

LGTM!

Comment thread x-pack/plugins/alerting/server/rules_client/rules_client.ts
@XavierM XavierM merged commit a743498 into elastic:main Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:enhancement Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// v8.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Actionable Observability] Change "mutted" to "snoozed" on for summary at on top of Alerts page.

5 participants