[Security Solution][Detection Engine] Signals detected between 0 and 100 go into a degraded state #77342
Labels
bug
Fixes for quality problems that affect the customer experience
Feature:Detection Rules
Anything related to Security Solution's Detection Rules
Team: SecuritySolution
Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc.
Team:SIEM
v7.10.0
Kibana version:
7.9.2
Describe the bug:
When detection engine detects signals between 0 and 100 (max signal count) it will go into a tight loop and re-examine almost the same time frame for a long time. In a way it goes through a very odd "count down" of the found signals one by one. It still operates but goes in a very slow manner "counting down" the signals and trying to index them one at a time until it exhausts them.
This is probably a
search_after
that is pointing to the existing first found signal and then slowly marching down or a loop somewhere that should have a "break" with a piece of boolean logic that was missed.Steps to reproduce:
First ensure you have the debug mode of signals enabled like so in your kibana.yml:
Then create any rule which will find some signals but not zero nor 100. Make sure you do a somewhat larger look back time to hit existing already created signals to cause the odd count down.
In my example I am using the query of:
source.port < 2000
, a runtime of1m
and an additional look-back of3m
Allow the rule to run at least "twice" and then then in your logs will you see this type of behavior where it is doing the count down and the rule execution is slowing down:
server log [07:17:23.448] [debug][plugins][plugins][securitySolution][securitySolution] individual bulk process time took: 67.05 milliseconds server log [07:17:23.449] [debug][plugins][plugins][securitySolution][securitySolution] took property says bulk took: 5 milliseconds server log [07:17:23.449] [debug][plugins][plugins][securitySolution][securitySolution] ignored 5 duplicate signals server log [07:17:23.449] [debug][plugins][plugins][securitySolution][securitySolution] bulk created 0 signals
Expected behavior:
It should be performant and quick to skip over the signals it already found.
The text was updated successfully, but these errors were encountered: