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

[ML] Transforms: Improve messages for recovered alerts #205721

Merged
merged 10 commits into from
Jan 9, 2025

Conversation

darnautov
Copy link
Contributor

@darnautov darnautov commented Jan 7, 2025

Summary

Updates the transform health alerting rules:

  • Removes 100 limit
  • Changes format of the alert message
  • Mentions recovered transforms in the alert message

Checklist

@darnautov darnautov added :ml Feature:Transforms ML transforms v9.0.0 Feature:Alerting/RuleTypes Issues related to specific Alerting Rules Types Team:ML Team label for ML (also use :ml) backport:version Backport to applied version labels v8.18.0 labels Jan 7, 2025
@darnautov darnautov self-assigned this Jan 7, 2025
@darnautov darnautov requested a review from a team as a code owner January 7, 2025 12:52
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@walterra walterra changed the title [ML] Transforms: Imporove messages for recovered alerts [ML] Transforms: Improve messages for recovered alerts Jan 7, 2025
const count = response.length;
const transformsString = response.map((t) => t.transform_id).join(', ');
const count: number = isHealthy ? previousState?.unhealthy?.length ?? 0 : response.length;
const transformsString = isHealthy
Copy link
Contributor

Choose a reason for hiding this comment

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

As discussed, what about limiting the number of IDs we display in the first part of the message to say 10 (?), to say something like

35 transforms are not started: endpoint.metadata_current-default-8.18.0-prerelease.1, endpoint.metadata_united-default-8.18.0-prerelease.1, fq_continuous_latest_transform, fq_response_times_continuous, gallery_latest_transform, transform_a, transform_b, transform_c, transform_d, transform_e and 25 others

If a user really wants to see all the IDs they can loop through each of the IDs usinh the context variables.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated in f36309a

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

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

Latest text change for the format of the alert message to list only the first 10 IDs with an e.g. and 10 others LGTM.

One question - if there were e.g. 6 unhealthy transforms, and then 5 become healthy, followed some time later by the 6th transform becoming healthy, then you only get a recovered message when the final transform becomes healthy. The recovered message only includes the ID(s) of the transforms which become healthy in the current check. You don't get any indication that the first 5 transforms have become healthy. Guess this is a limitation of the framework and you only get the ID(s) of the last transform to become healthy when it goes to recovered?

@darnautov
Copy link
Contributor Author

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

cc @darnautov

@darnautov darnautov merged commit 737cf96 into elastic:main Jan 9, 2025
8 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/12694674810

@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jan 9, 2025
#206110)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ML] Transforms: Improve messages for recovered alerts
(#205721)](#205721)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Dima
Arnautov","email":"dmitrii.arnautov@elastic.co"},"sourceCommit":{"committedDate":"2025-01-09T16:53:09Z","message":"[ML]
Transforms: Improve messages for recovered alerts
(#205721)","sha":"737cf968094c464a8824933c0f5017fd1b511e71","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement",":ml","Feature:Transforms","v9.0.0","Feature:Alerting/RuleTypes","Team:ML","backport:version","v8.18.0"],"title":"[ML]
Transforms: Improve messages for recovered alerts
","number":205721,"url":"https://github.com/elastic/kibana/pull/205721","mergeCommit":{"message":"[ML]
Transforms: Improve messages for recovered alerts
(#205721)","sha":"737cf968094c464a8824933c0f5017fd1b511e71"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/205721","number":205721,"mergeCommit":{"message":"[ML]
Transforms: Improve messages for recovered alerts
(#205721)","sha":"737cf968094c464a8824933c0f5017fd1b511e71"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Dima Arnautov <dmitrii.arnautov@elastic.co>
Zacqary pushed a commit to Zacqary/kibana that referenced this pull request Jan 9, 2025
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Jan 13, 2025
@darnautov darnautov deleted the ml-fix-transform-alert-message branch January 20, 2025 12:35
viduni94 pushed a commit to viduni94/kibana that referenced this pull request Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels Feature:Alerting/RuleTypes Issues related to specific Alerting Rules Types Feature:Transforms ML transforms :ml release_note:enhancement Team:ML Team label for ML (also use :ml) v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants