Comparing values percentually #1600
Unanswered
lufimoreira94
asked this question in
Q&A
Replies: 3 comments 3 replies
-
Perhaps the Spike Aggregation rule type will solve your needs. Documentation is online at https://elastalert2.readthedocs.io/en/latest/ruletypes.html#spike-aggregation. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Do some timerange windows not have any events? |
Beta Was this translation helpful? Give feedback.
1 reply
-
Ok, try specifying |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi. I'm trying to create a rule that triggers when a duration is 150% above the average time of the last 10 minutes, grouped by an Id. I created an elasticsearch transform to facilitate this process, in which it returns that average time grouped by said Id.
What I'm missing is how to compare those values percentually.
Here's a simple example in case I didn't explain it well:
Imagine that in the last 10 minutes there are 5 logs where 'labels.db_statement_encoded' is defined as "1234", and each duration is, respectively, 2, 4, 3, 2, 4. Then, the average duration would be 3. After that, another log with labels.db_statement_encoded equal to "1234" comes with a duration of 4. That should not trigger the rule, since 4 is lower than 150% of the previous average. But if the duration were to be 6, then it would trigger, since it would be 200% of the average duration of the last 10 minutes.
Long story short, I need to know when X number is 150% or more the value of Y.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions