ElastAlert not automation re-create Index after elastalert Index deleted #1299
-
Because control for Size Index
But after index be delete by index lifecycle policy. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Deleting the ElastAlert 2 index while it's running is equivalent to pulling the rug out from underneath someone. It's going to cause problems. You will need to perform index pruning in a maintenance window, where you first shutdown ElastAlert 2, then prune the index, and then restart ElastAlert 2. |
Beta Was this translation helpful? Give feedback.
One option is to use a cron or systemd timer that invokes the ES delete API every night, to prune older documents. Ex: https://discuss.elastic.co/t/automatically-delete-older-documents/247078/10. This is a small effort, in the range of hours.
Another option is to submit a PR to ElastAlert 2 for switching to daily indices. This is a much larger effort compared to the first option, in the range of days to weeks depending on your Python and unit test skillset.