Skip to content

Conversation

@nastasha-solomon
Copy link
Contributor

@nastasha-solomon nastasha-solomon commented Dec 8, 2025

Summary

Fixes #4145. By explaining how to use the new Anomaly filter field to narrow down the list of anomalies that ML anomaly detection rules check for. Also refreshes outdated screenshots.

Generative AI disclosure

  1. Did you use a generative AI (GenAI) tool to assist in creating this contribution?
  • Yes
  • No

Preview

@github-actions
Copy link

github-actions bot commented Dec 8, 2025

✅ Vale Linting Results

No issues found on modified lines!

@github-actions
Copy link

github-actions bot commented Dec 8, 2025

@nastasha-solomon nastasha-solomon marked this pull request as ready for review December 8, 2025 19:06
@nastasha-solomon nastasha-solomon requested review from a team as code owners December 8, 2025 19:06
Copy link
Contributor

@benironside benironside left a comment

Choose a reason for hiding this comment

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

Nice work! Left a few suggestions for your consideration, I'm not an expert on this so take it with a grain of salt. If you decide to apply them to ml-configuring-alerts.md, you may want to also update create-an-anomaly-detection-rule.md

When creating the KQL query, you're given suggestions for the most relevant fields to filter by. To compare actual and typical values, use operators such as `>` (greater than), `<` (less than), or `=` (equal to).
::::

9. (Optional) Turn on **Include interim results** to include results that are created by the anomaly detection job *before* a bucket is finalized. These results might disappear after the bucket is fully processed. Include interim results if you want to be notified earlier about a potential anomaly even if it might be a false positive.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
9. (Optional) Turn on **Include interim results** to include results that are created by the anomaly detection job *before* a bucket is finalized. These results might disappear after the bucket is fully processed. Include interim results if you want to be notified earlier about a potential anomaly even if it might be a false positive.
9. (Optional) Turn on **Include interim results** to include results created by the anomaly detection job *before* their bucket is finalized. These results might disappear after the bucket is fully processed. Include interim results if you want to be notified earlier about a potential anomaly even if it might be a false positive.

Copy link
Member

@bmorelli25 bmorelli25 left a comment

Choose a reason for hiding this comment

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

I have some feedback on screenshots that you didn't ask for 😬 sorry!

:::{image} /explore-analyze/images/ml-anomaly-create-anomaly-detection.png
:alt: Selecting Anomaly detection rule type
:screenshot:
:::
Copy link
Member

Choose a reason for hiding this comment

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

I know you didn't add this (maybe you did previously?). I'm not sure this screenshot adds any value. The instruction for this line is short and to the point 2. Select the **{{anomaly-detect-cap}}** rule type.. What do you think about removing this screenshot?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree with removing. I was thinking the same : )

Comment on lines +79 to 82
:::{image} /explore-analyze/images/ml-anomaly-alert.png
:alt: Selecting result type, severity, and interim results
:screenshot:
:::
Copy link
Member

Choose a reason for hiding this comment

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

Whereas the previous screenshot felt too obvious to be needed, this one feels more confusing than helpful. I had to re-read step seven a few times before I saw the Include interim results toggle at the bottom.

Is this necessary? Why does step 7 get a screenshot when step 4 (Select a type of machine learning result. You can create rules based on bucket, record, or influencer results.), for example, does not?

Copy link
Member

Choose a reason for hiding this comment

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

This is also very similar to solutions/images/serverless-anomaly-detection-alert.png, but different enough to mean we need to update two screenshots instead of one when they inevitably go stale.

Copy link
Member

Choose a reason for hiding this comment

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

This is another interesting one. Of the three screenshots I've commented on, this is the one you could probably easiest convince me to stay. But that's mostly because it's pretty; It shows off the feature config which looks quite nice.

I'm curious how we use screenshots elsewhere. Is this the typical pattern? What I mean by that is that this screenshot is in step 5, but then applies to steps 6-14.

Admittedly, this is not my area of expertise. Would love to hear your thoughts and @florent-leborgne's.

Copy link
Member

Choose a reason for hiding this comment

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

Reading this too but there's not much to go off of: https://docs.elastic.dev/tech-writing-guidelines/ui-writing#screenshots.

* Certain partitioning or influencers fields in the anomaly results match specified conditions
* The actual or typical scores in the anomalies match specified conditions

For example, say you've set up alerting for an anomaly detection job that has `partition_field = "response.keyword"` as the detector. If you were only interested in being alerted on `response.keyword = 404`, enter `partition_field_value: "404"` into the **Anomaly filter** field. When the rule runs, it will only alert on anomalies with `partition_field_value: "404"`.
Copy link
Member

Choose a reason for hiding this comment

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

nice example!

…ing-alerts.md

Co-authored-by: Benjamin Ironside Goldstein <91905639+benironside@users.noreply.github.com>
nastasha-solomon and others added 2 commits December 10, 2025 11:17
…ing-alerts.md

Co-authored-by: Benjamin Ironside Goldstein <91905639+benironside@users.noreply.github.com>
…ing-alerts.md

Co-authored-by: Benjamin Ironside Goldstein <91905639+benironside@users.noreply.github.com>
Copy link

@rbrtj rbrtj left a comment

Choose a reason for hiding this comment

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

Overall LGTM 👍

Comment on lines +63 to +64
* One or more partitioning or influencers fields in the anomaly results match the specified conditions
* The actual or typical scores in the anomalies match the specified conditions
Copy link

Choose a reason for hiding this comment

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

These are definitely the most important filters available for narrowing down the results, however, there are more fields you can filter by. I think it's okay, I'm just wondering whether it suggests that the only available fields are the ones mentioned.

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.

[Internal][ML UI/AI Infra][Alerting]: Anomaly Detection: Alerting rule filtering

5 participants