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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

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