Linux technical support - support@alexlinux.com


elasticsearch graylog – delete messages

#!/bin/bash

for i in {272..281}
do

curl -H 'Content-Type: application/json' -XPUT http://localhost:9200/MY_INDEX_$i/_settings -d '{
   "index" : {
      "blocks.write" : false
   }
}'
curl -X POST localhost:9200/MY_INDEX_$i/_delete_by_query?pretty -H 'Content-Type: application/json' -d'
{
  "query": {
    "match": {
      "channel": "basket"
    }
  }
}
'
curl -H 'Content-Type: application/json' -XPUT http://localhost:9200/MY_INDEX_$i/_settings -d '{
   "index" : {
      "blocks.write" : true
   }
}'


done


Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>