-
Notifications
You must be signed in to change notification settings - Fork 285
Data lifecycle
Peter Manev edited this page May 7, 2015
·
14 revisions
SELKS uses the powerful open source elasticsearch as a database and search engine.
In order to keep the disk space and data in check you can follow these simple steps using elasticsearch-curator.
- Install curator
root@SELKS:~# pip install elasticsearch-curator
- Set up a cron job
You can just add that line to your /etc/crontab
:
0 3 * * * root /usr/local/bin/curator delete indices --older-than 16 --time-unit days --timestring '%Y.%m.%d'
That will kick in every day at 3 am and clean up/delete all the indices(data) older than 16 days from elsticsearch.