jertel / elastalert2

ElastAlert 2 is a continuation of the original yelp/elastalert project. Pull requests are appreciated!
https://elastalert2.readthedocs.org
Apache License 2.0
895 stars 282 forks source link

FlatlineRule: Extract functions that could be overriden by child classes #1291

Closed rundef closed 10 months ago

rundef commented 10 months ago

Description

In a project, I created a class extending FlatlineRule and added some custom code. However, I had to copy the code of check_for_match and garbage_function in the children class just to change a few lines of code, which isn't great.

This PR adds:

Checklist

Questions or Comments

I did not add any unit tests because there isn't any new feature. I did not update the documentation because there's no section about extending rules.