定时删除elasticsearch的index

#!/bin/bash
find /data/elasticsearch/data/kz-log/nodes/0/indices/ -type d -mtime +5 |  awk -F"/" '{print $9}' | grep -v kibana | uniq >esindex.txt
cat /home/wwwad/.sh/esindex.txt | while read line
do
echo ${line}
curl -XDELETE "http://10.19.12.69:9211/${line}"
done

原文地址:https://www.cnblogs.com/smail-bao/p/7373857.html