This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
mission:log:2013:07:17:elasticsearch-garbage-collector [2013-07-17 11:59] – [Elasticsearch Garbage Collector] chrono | mission:log:2013:07:17:elasticsearch-garbage-collector [2014-02-20 15:05] (current) – Fixed command string to only cover logstash indexes chrono | ||
---|---|---|---|
Line 32: | Line 32: | ||
if [ ${DF} -le 30000000 ]; then | if [ ${DF} -le 30000000 ]; then | ||
- | INDEX=$(/ | + | INDEX=$(/ |
curl -XDELETE " | curl -XDELETE " | ||
fi | fi | ||
Line 56: | Line 56: | ||
</ | </ | ||
- | It runs every 10 minutes (as a cron job) and checks the available space on the device where Elasticsearch stores its indices. In this example /logdata | + | It runs every 10 minutes (as a cron job) and checks the available space on the device where Elasticsearch stores its indices. In this example /dev/ |
A simple locking mechanism will prevent multiple running instances in case of timing issues. All you need is curl for it to work and it will increase your storage efficiency so that you can always have as much past data available as your storage allows without the risk of full disk issues or the hassle of manual monitoring & maintaining. | A simple locking mechanism will prevent multiple running instances in case of timing issues. All you need is curl for it to work and it will increase your storage efficiency so that you can always have as much past data available as your storage allows without the risk of full disk issues or the hassle of manual monitoring & maintaining. |