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!

Now Available: Cisco Talos Threat Intelligence Integrations for Splunk Security Cloud ...

At .conf24, we shared that we were in the process of integrating Cisco Talos threat intelligence into Splunk ...

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...

Easily Improve Agent Saturation with the Splunk Add-on for OpenTelemetry Collector

Agent Saturation What and Whys In application performance monitoring, saturation is defined as the total load ...