i have a wrong index that named 'logstash-%{type}-%{item}-2015.09.30'. i want to delete it. when i delete it by curl -XDELETE(curl -XDELETE http://192.168.3.15:9200/logstash-%{type}-%{item}-2015.09.30) return 'curl: (52) Empty reply from server'.
You have to escape/encode special characters like %
, {
...
thank you , dadoonet. it's work good.
Hi @dadoonet,
I'm trying to Delete the Index through Shell script. Please find below for the code. But I'm getting the error as "curl: (52) Empty reply from server". Please let me know if there is anything I'm doing wrong.
current=$(date +"%Y-%m-%d");
daybeforeyesterday=$( date -d "${current} -2 days" +'%Y.%m.%d' );
oldindex=ntest-$daybeforeyesterday;
echo $oldindex;
curl -XDELETE 'http://localhost:9200/'"$oldindex"''
echo
Thanks,
Vani Aravinda
It sounds like your server is not running or on another port or hostname?