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

[Security Solution] Detection Rules' max_signals parameter is not respected beyond 1000 #157313

Open
Tracked by #165878
rylnd opened this issue May 10, 2023 · 9 comments
Open
Tracked by #165878
Assignees
Labels
bug Fixes for quality problems that affect the customer experience needs product Team:Detection Engine Security Solution Detection Engine Area Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.

Comments

@rylnd
Copy link
Contributor

rylnd commented May 10, 2023

Describe the bug:

Kibana/Elasticsearch Stack version:
8.8

Steps to reproduce:

  1. Create a rule with max_signals set to 10,000
  2. Execute the rule such that it would create >1000 alerts
  3. Observe the rule fail

Current behavior:
Up to 1000 alerts are generated, and the rule has an execution error. max_signals is not respected, and the default alerting value of 1000 is used to cap/validate the number of signals.

Expected behavior:
Up to 10,000 alerts are generated. If that number is exceeded, a warning is created on the rule.

Screenshots (if relevant):

Screenshot 2023-05-10 at 1 27 38 PM

Related Issues

While not confirmed, I believe that the work done for #153611 introduced this behavior.

Slak conversation

https://elastic.slack.com/archives/CN7AD3605/p1683741078780019

@rylnd rylnd added bug Fixes for quality problems that affect the customer experience triage_needed Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.8.0 labels May 10, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@rylnd rylnd changed the title [Security Solution] Detection Rules' max_signals parameter is not respected [Security Solution] Detection Rules' max_signals parameter is not respected beyond 1000 May 12, 2023
@MadameSheema MadameSheema added Team:Detections and Resp Security Detection Response Team Team:Detection Engine Security Solution Detection Engine Area labels May 15, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

@e40pud
Copy link
Contributor

e40pud commented May 30, 2023

We added docs about this behaviour elastic/security-docs#3293

@yctercero I guess we can consider options to fix this in 8.9?

@yctercero
Copy link
Contributor

It'd be great to get to this one 8.9 if possible. I'm not sure how many users are setting their max signals that high - maybe we have the telemetry @peluja1012 ? But would still be great to understand.

@yctercero
Copy link
Contributor

@banderror I think your team is dealing with this in the current prebuilt rule customization work - is that accurate?

@yctercero yctercero removed their assignment Jun 5, 2024
@banderror
Copy link
Contributor

banderror commented Jun 5, 2024

@yctercero Yes and no.

We worked on #173593 and fixed #164234. We also noticed the issue described in this ticket and had some discussion with PM and TRaDE. Summary of the discussion can be found here. Immediate action items we've already addressed were:

  • We agreed that it would be worth documenting that those rules that have max_signals > xpack.alerting.rules.run.alerts.max will be generating at most xpack.alerting.rules.run.alerts.max alerts per execution (1000 by default).

No more work related to this is planned within the rule customization epic.

But I agree that it's an issue and non-friendly and obscure UX. I'm just unsure that it should be handled as described in the expected behavior section in this ticket. The xpack.alerting.rules.run.alerts.max setting seems to be a hard cap by design, because it's a global circuit breaker. We could handle this issue by changing the UX of installing and enabling rules. If we do it like that, the issue will be on the Rule Management side.

cc @approksiu

@banderror banderror added Team:Detection Rule Management Security Detection Rule Management Team needs product and removed v8.8.0 consider-next labels Jun 5, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detection-rule-management (Team:Detection Rule Management)

@yctercero
Copy link
Contributor

Thanks for the quick response @banderror !

We could handle this issue by changing the UX of installing and enabling rules. If we do it like that, the issue will be on the Rule Management side.

By this, do you mean just updating the UI to add validation so users can't set anything above xpack.alerting.rules.run.alerts.max and updating the prebuilt rules to be below that threshold? I know it could be a moving target since it's a setting but perhaps setting the prebuilt rules to the default xpack.alerting.rules.run.alerts.max is what I imagine?

@banderror
Copy link
Contributor

banderror commented Jun 5, 2024

By this, do you mean just updating the UI to add validation so users can't set anything above xpack.alerting.rules.run.alerts.max and updating the prebuilt rules to be below that threshold?

@yctercero No, we already have validation and it's a warning in this case (user can still create or update the rule). Also, updating the 18 prebuilt rules that have max_signals == 10000 is not an option.

The idea is that the app should give a heads up and explain to the user that if they want to use certain prebuilt rules, they will need/want to increase the global setting to allow these rules to promote as many external alerts as possible. I think how users increase this global setting is a separate question. Maybe, we can make it easier for users via Kibana Advanced Settings.

But it's all speculation from my side. Let's wait for input from @approksiu when she has a chance to think about the UX for this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience needs product Team:Detection Engine Security Solution Detection Engine Area Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.
Projects
None yet
Development

No branches or pull requests

7 participants