Removing old indices in elasticsearch

后端 未结 9 2111
生来不讨喜
生来不讨喜 2020-12-07 21:12

I have the many of my logs indexed in logstash-Year-Week format. That is if i want to delete indices older than a few weeks, how can I achieve that in elasticsearch. Is ther

9条回答
  •  再見小時候
    2020-12-07 21:33

    Take a look at Curator, a tool developed specially for this kind of use case.

    A sample command, for the documentation:

    curator --host 10.0.0.2 delete indices --older-than 30 --time-unit days \
       --timestring '%Y.%m.%d'
    

提交回复
热议问题