Getting Data In

How to delete indexed data for a particular date?

sahoo0233
Path Finder

Hi,

I index data on a daily basis. For indexing, I have made a monitoring path in inputs.conf, so once the file is in that path it, automatically gets indexed.

So I have made a mistake by pasting the wrong set of files in that monitoring path. Now I need to delete the particular set of files for that particular date itself.

Its urgent as we are into production right now.

Tags (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Assuming you have Delete permission, search for the data you don't want and pipe it to the delete command.

index=foo source=somefile earliest=7/22/2015 00:00:00 latest=7/22/2015 23:59:59 | delete

Add qualifiers as needed to select only the data you want to delete.

---
If this reply helps you, Karma would be appreciated.

sahoo0233
Path Finder

Hi rich,

I am a rookie in splunk, could you please help where should i give the above command, any specified path?? a small example may be!!

Thanks

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Enter your command in the search bar of the Splunk web GUI. You'll need to update my example for your environment (index name, date, etc.).

---
If this reply helps you, Karma would be appreciated.
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...