User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
mission:log:2013:07:17:elasticsearch-garbage-collector [2013/07/17 14:45] – [Elasticsearch Garbage Collector] chronomission: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=$(/bin/ls -1t /logdata/elasticsearch/nodes/0/indices/ | tail -1)+    INDEX=$(/bin/ls -1td /logdata/dntx-es/nodes/0/indices/logstash-* | tail -1 | xargs -n 1 basename)
     curl -XDELETE "http://localhost:9200/${INDEX}"     curl -XDELETE "http://localhost:9200/${INDEX}"
   fi   fi