Hello

I have this Bash-Script to delete messages for the ElasticSearch Server.

#!/bin/sh
FDATE=`date +"%F %H:%M:%S.000" --date="60 days ago"`
TDATE=`date +"%F %H:%M:%S.000" --date="0 days ago"`

RANGE='{
  "query": {
    "filtered": {
      "query": {
        "query_string": {
          "query": "level:7",
          "allow_leading_wildcard": false
        }
      },
      "filter": {
        "bool": {
          "must": {
            "range": {
              "timestamp": {
                "from": "'${FDATE}'",
                "to": "'${TDATE}'",
                "include_lower": true,
                "include_upper": true
              }
            }
          }
        }
      }
    }
  }
}'
/usr/bin/curl -v3 -H "Content-Type: application/json" -XDELETE 
"http://127.0.0.1:9200/graylog2_*/message/_query"; -d "${RANGE}"

I can run this script and have no error messages, but no messages will be 
deleted.

Has anyone any idea what could be the problem?

cheers
Steve

PS: When i run the same query with XGET then i have total hits over 100'000

-- 
You received this message because you are subscribed to the Google Groups 
"Graylog Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/graylog2/43c42c59-32d3-44a2-8bc1-fe927d30b433%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to