Replies: 2 comments 6 replies
-
For what it's worth, I did just remove the addition of the Could use some help still though about the rationale behind the 10 minutes addition in the first place. |
Beta Was this translation helpful? Give feedback.
-
I doubt anyone can give the original reason for that 10 minute addition, as the original author of that change likely isn't watching this forum. My comment in the referenced post is my best guess as to what it's doing. I think a better use of time would be to submit a PR that makes that hardcoded value configurable. If you're interested in submitting that PR, please read through the short list of contribution guidelines first. |
Beta Was this translation helpful? Give feedback.
-
Hello, referencing from #1462 (comment), is there a specific reason behind hardcoding the end time to be:
timestampX + 10 minutes
?I guess this must be the line of code for that:
elastalert2/elastalert/elastalert.py
Line 1365 in d400d00
Not sure I understand the reason from referenced comment:
My understanding is that timestampX belongs to the final record that reaches the
num_events
param of frequency rule, so not sure the intent for stretching the end time beyond this record's timestamp.And wouldn't this be the reason for causing the mismatch of count if there happens to be subsequent immediate records in Elastic that matches the filter e.g. 20 hits during 3:20 ~ 3:21 in previous example.
For our use case, we are experiencing the mismatch similar to #1462 (comment), and found that
num_hits
seems to match better with what we see on ELK log (Kibana).Assuming the explanation from #1462 (comment) to be the culprit of the mismatch (hits from previous run):
Any solution then for making sure
top_count_keys
matches thenum_hits
numbers? We've tried playing around withtimeframe
,buffer_time
,run_every
, but failed to have the numbers to match.Use case is
timeframe
to be 1 minute, and the rest is flexible.Appreciate any suggestions please, thx
Beta Was this translation helpful? Give feedback.
All reactions