-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run ElastAlert rule only once #1775
Comments
If you provide |
I have managed to install ElastAlert (pip install elastalert) into a python Azure Function. |
Not really. It's technically possible of course, but very difficult. Do you have access to making temp files? |
The solution proposed with the This is very unfortunate as this also breaks the 'run elastalert in Lambda-function' use-case. |
@g-io
Perhaps it's exiting immediately for you because the --end flag is too close to the current time. Can you try making sure that it has at least one full |
@Qmando yes good point, that could work (although it needs to be at least Even when an However, I see 2 other problems now. 1st, the timing is more complicated. 2nd, I'm afraid to miss events with an Re 1, basically there is
Only if the jobs are already dispatched at exit, they will get executed. This means we come up with something like:
That must be fulfilled, with run_time to be minimized to save on lambda cost. Oh, and add the start overhead, say 5sec if you've come to a number. Still feels bad and hacky 😞 -- There must be a better way to do it? Re 2: Not sure if my understanding is right here. |
I ran into this same issue. I ended up extending the |
I'm looking to run multiple ElastAlert instances each as Azure Functions with different rules triggered by external independent timers.
Is there a way to have ElastAlert run a specific action file just once and then exit? i.e. I dont want to utilize the run_every parameter and utilize my external timers to handle when ElastAlert performs the query against ElasticSearch.
The text was updated successfully, but these errors were encountered: