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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...