Getting Data In

Delete a single file out of an index

efelder0
Communicator

Once I have indexed a group of files into Splunk, is there a method/command where I can delete only one of those files without having to clean the entire index?

Tags (2)
0 Karma

sdaniels
Splunk Employee
Splunk Employee

You can perform a search and the pipe to delete ( | delete). That will delete that specific data from being searchable. In your case you could specify a certain source and host to target an individual log file source. It does not however reclaim disk space. The only way to do that is to clean the index. Note that there isn't a role that has access to delete by default and as a best practice you should not give that access anyways. So, you'll want to temporarily give access and then take it off afterward.

http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Delete

Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...