Send alert only for first match or how to avoid the realert #520
-
Hi Team! how are you?
Regards! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Is the Kubernetes Cluster Autoscaler not an option for your deployment? It handles cluster level scaling for you, based on a number of inputs, including CPU usage. The major cloud providers include this feature. Assuming you have a reason to not use the autoscaler, one option with ElastAlert 2 is to have the rule disable itself once it triggers, and then when the 80% rule triggers, have it re-enable the 20% rule. To make a rule disable itself, and/or enable another rule, would require creating an enhancement that performs this work. It would flip the rule's Drawbacks of this approach is that you will struggle to keep the scale state synchronized with the rules. Ex: Someone manually scales up the cluster, but ElastAlert 2 is unaware and thinks it's still all the way scaled down. To account for this you would need to go the extra step of having the enhancement query the kubernetes cluster API to learn about the current scale state. I recommend that you try to find a way to use the Cluster Autoscaler. |
Beta Was this translation helpful? Give feedback.
-
Hi @jertel! yeah, we use autoscaler, but we have an API that we need to send information about the limit per user (user in the platform) so we change the max nodes (in DO), etc, so is more complex. About the option we can try I think. |
Beta Was this translation helpful? Give feedback.
Is the Kubernetes Cluster Autoscaler not an option for your deployment? It handles cluster level scaling for you, based on a number of inputs, including CPU usage. The major cloud providers include this feature.
Assuming you have a reason to not use the autoscaler, one option with ElastAlert 2 is to have the rule disable itself once it triggers, and then when the 80% rule triggers, have it re-enable the 20% rule. To make a rule disable itself, and/or enable another rule, would require creating an enhancement that performs this work. It would flip the rule's
is_enabled
key value to true or false as needed.Drawbacks of this approach is that you will struggle to keep the scale state synchro…