http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/docs-delete-by-query.html
On Thu, Apr 10, 2014 at 3:42 PM, Robert Logan <[email protected]> wrote: > I can .. with hair pulled out, but how to make this 'delete' these messages > for example? > > #!/bin/bash > RANGE='{ > "query" : { > "filtered" : { > "filter" : { > "range" : { > "timestamp" : { > "lt" : "SDATE", > "gt" : "EDATE" > } > } > }, > "query" : { > "match_all" : {} > } > } > } > }' > > SDATE=`date +"%F %H:%M:%S.000" --date="44 minutes ago"` > EDATE=`date +"%F %H:%M:%S.000" --date="45 minutes ago"` > RANGE=`echo $RANGE | sed "s/SDATE/${SDATE}/"` > RANGE=`echo $RANGE | sed "s/EDATE/${EDATE}/"` > /usr/bin/curl -XGET > "http://localhost:9200/graylog2_0/message/_search?pretty=true" -d "${RANGE}" > > > > On Thursday, 10 April 2014 13:46:16 UTC+1, Robert Logan wrote: >> >> >> Can anyone provide me with a sample 'curl' on elasticsearch to return >> messages that match the graylog 0.20 database? >> >> I have wasted half a day trying to do this to get to deleting 'old >> messages' but am totally frustrated now. >> >> >> ---------------------------------------------------------------------------------- >> >> The information in this email is confidential and may be legally >> privileged. It is intended solely for the addressee. Access to this email >> by anyone else is unauthorised. If you are not the intended recipient, any >> disclosure, copying, distribution or any action taken or omitted to be taken >> in reliance on it, is prohibited and may be unlawful. >> >> Policy Expert is a trading name of QMetric Group Limited who is authorised >> and regulated by the Financial Conduct Authority. The registered company >> address of QMetric Group Limited is: 32-38 Dukes Place, London, EC3A 7LP and >> its company registration number is 07151701. >> > > ---------------------------------------------------------------------------------- > > The information in this email is confidential and may be legally privileged. > It is intended solely for the addressee. Access to this email by anyone > else is unauthorised. If you are not the intended recipient, any > disclosure, copying, distribution or any action taken or omitted to be taken > in reliance on it, is prohibited and may be unlawful. > > Policy Expert is a trading name of QMetric Group Limited who is authorised > and regulated by the Financial Conduct Authority. The registered company > address of QMetric Group Limited is: 32-38 Dukes Place, London, EC3A 7LP and > its company registration number is 07151701. > > -- > You received this message because you are subscribed to the Google Groups > "graylog2" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "graylog2" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
