-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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] Context for recovered alerts #132496
[ML] Context for recovered alerts #132496
Conversation
Pinging @elastic/ml-ui (:ml) |
x-pack/plugins/ml/server/lib/alerts/jobs_health_service.test.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/ml/server/lib/alerts/jobs_health_service.test.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/ml/server/lib/alerts/register_jobs_monitoring_rule_type.ts
Show resolved
Hide resolved
@elasticmachine merge upstream |
x-pack/plugins/ml/server/lib/alerts/jobs_health_service.test.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/ml/server/lib/alerts/jobs_health_service.test.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/ml/server/lib/alerts/jobs_health_service.test.ts
Outdated
Show resolved
Hide resolved
|
||
if (hardLimitCount > 0) { | ||
message = i18n.translate('xpack.ml.alertTypes.jobsHealthAlertingRule.mmlMessage', { | ||
defaultMessage: `{count, plural, one {Job} other {Jobs}} {jobsString} reached the hard model memory limit. Assign the job more memory and restore from a snapshot from prior to reaching the hard limit.`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defaultMessage: `{count, plural, one {Job} other {Jobs}} {jobsString} reached the hard model memory limit. Assign the job more memory and restore from a snapshot from prior to reaching the hard limit.`, | |
defaultMessage: `{count, plural, one {Job} other {Jobs}} {jobsString} reached the hard model memory limit. Assign more memory to the job and restore it from a snapshot taken prior to reaching the hard limit.`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI this text has been there for a while. It's also been reviewed before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in 552d005
'xpack.ml.alertTypes.jobsHealthAlertingRule.mmlSoftLimitMessage', | ||
{ | ||
defaultMessage: | ||
'{count, plural, one {Job} other {Jobs}} {jobsString} reached the soft model memory limit. Assign the job more memory or edit the datafeed filter to limit scope of analysis.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'{count, plural, one {Job} other {Jobs}} {jobsString} reached the soft model memory limit. Assign the job more memory or edit the datafeed filter to limit scope of analysis.', | |
'{count, plural, one {Job} other {Jobs}} {jobsString} reached the soft model memory limit. Assign more memory to the job or edit the datafeed filter to limit the scope of analysis.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI this text has been there for a while. It's also been reviewed before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the context. It still sounds better this way in my opinion. Please take it or leave it as you wish.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated 552d005
…utov/kibana into ml-126803-recovered-alerts-context
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Code review only for use of getRecoveredAlerts()
inside the rule executors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left another suggestion for one of the messages, but otherwise tested and LGTM.
'xpack.ml.alertTypes.anomalyDetectionAlertingRule.recoveredMessage', | ||
{ | ||
defaultMessage: | ||
'No anomalies have been found that exceeded the [{severity}] threshold.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd edit this to No anomalies have been found that exceed the severity threshold of {severity}.
I don't think it needs the square brackets around the severity value.
Or better still, could you include the lookback interval in there too? Such as
No anomalies have been found in the past {lookbackInterval} that exceed the severity threshold of {severity}.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in b27c03a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UI text LGTM.
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @darnautov |
* recovered context for ad alerting rule * datafeed report for recovered alerts * mml report for recovered alerts * update executor for setting recovered context * update jest tests, fix mml check * update error messages check * update jest tests * update delayed data test * fix the mml check * enable doesSetRecoveryContext * add rule.name to the default message * fix datafeed check * recovered message * refactor, update anomaly explorer URL time range for recovered alerts * update message for recovered errorMessage alert * update delayedDataRecoveryMessage * fix time range * update message for recovered anomaly detection alert * update mml messages
Summary
Resolves #126803
Adds context for recovered alerts created by Anomaly Detection and Anomaly Detection Health rule types.
The recovered context is limited to the same context and the active alerts, hence there are no new fields.
For Anomaly detection recovered alerts contains job IDs and link to the Anomaly Explorer page.
For Anomaly detection health, the
message
field is updated according to the test andresults
contain extra data about executed tests.How to test
Anomaly detection rule
Default message example:
bucket_span
andquery_delay
of the datafeed)Note, that for recovered alerts only these fields from the context are populated (because there is actually no anomaly has been found):
context.jobIds
context.anomalyExplorerUrl
context.message
Anomaly detection health rule
The example with the "Datafeed is not started" test:
Default message example:
Checklist