Page 1 of 1

Delete log data

Posted: Thu Jul 19, 2018 1:34 pm
by cockraml
I messed up when trying to import data from a file. How do I delete the data out of the log server?

Re: Delete log data

Posted: Thu Jul 19, 2018 1:38 pm
by scottwilkerson
If you go to Admin -> Index Status

You can delete any or all of the daily indexes

Re: Delete log data

Posted: Thu Jul 19, 2018 1:52 pm
by cockraml
scottwilkerson wrote:If you go to Admin -> Index Status

You can delete any or all of the daily indexes

I apologize, but all I see is a status of how many documents, total shards, and other statistics. How do I remove the data?

Re: Delete log data

Posted: Thu Jul 19, 2018 2:01 pm
by scottwilkerson
In the Actions column on the right you can click "delete"

Or for days other than the current day, you can check all the boxes and choose delete from the "With selected indices: " drop down on the bottom

Re: Delete log data

Posted: Thu Jul 19, 2018 2:04 pm
by scottwilkerson
If you only have a current day index you may need to run the following from the CLI

Code: Select all

curl -XDELETE localhost:9200/logstash-2018.07.19/

Re: Delete log data

Posted: Thu Jul 19, 2018 2:20 pm
by cockraml
scottwilkerson wrote:In the Actions column on the right you can click "delete"

Or for days other than the current day, you can check all the boxes and choose delete from the "With selected indices: " drop down on the bottom
I am sorry, but I don't see an actions column. Please see my attached screenshot.
Screen Shot 2018-07-19 at 3.19.19 PM.png

Re: Delete log data

Posted: Thu Jul 19, 2018 2:27 pm
by scottwilkerson
Yes, it auto-drills in to this if you only have 1 index, the following will delete that index, and then it will be re-created when the first new log comes in.
scottwilkerson wrote:If you only have a current day index you may need to run the following from the CLI

Code: Select all

curl -XDELETE localhost:9200/logstash-2018.07.19/

Re: Delete log data

Posted: Thu Jul 19, 2018 2:31 pm
by cockraml
scottwilkerson wrote:Yes, it auto-drills in to this if you only have 1 index, the following will delete that index, and then it will be re-created when the first new log comes in.
scottwilkerson wrote:If you only have a current day index you may need to run the following from the CLI

Code: Select all

curl -XDELETE localhost:9200/logstash-2018.07.19/

Thank you, this helped.

Re: Delete log data

Posted: Thu Jul 19, 2018 2:34 pm
by scottwilkerson
cockraml wrote:
scottwilkerson wrote:Yes, it auto-drills in to this if you only have 1 index, the following will delete that index, and then it will be re-created when the first new log comes in.
scottwilkerson wrote:If you only have a current day index you may need to run the following from the CLI

Code: Select all

curl -XDELETE localhost:9200/logstash-2018.07.19/

Thank you, this helped.
Locking thread.