Getting Data In

If a text file indexed in Splunk is completely replaced every 15 minutes, how to delete the old data from the index without restarting Splunk?

New Member

Hi,

I'am working with a text file indexed in Splunk.
Every 15 minutes this file is completely replaced. At this moment, I would like to flush the previous data in the according "index" without restarting splunk process (splunk clean).

Any ideas ?

Regards,

Julien

0 Karma

Splunk Employee
Splunk Employee

I would say that you're doing something wrong if you're indexing data in Splunk and then deleting it 15 minutes later. Splunk indexes are not intended to hold mutable data, and it's pretty bad at it. (The delete command for example is really only for exceptional cases and doesn't actually remove data from disk.) If you need something that is always, you could consider using lookup files, or (when version 6.2 comes out). These are intended to supplement Splunk use cases with a mutable store. However, if this is your primary data, then Splunk may not be the right solution for this.

New Member

Thank you guys for your replies...
I am currently out of office. I will check in a week and keep you posted.
Regards
Julien

0 Karma

Path Finder

Is it possible you could be using a lookup instead? This way it's never actually indexed (so never needs to be deleted).

Also, if it doesn't really need to be gone and you just want to see the latest version in searches, look at dedup

Splunk Employee
Splunk Employee

Try using delete.

Although deleting does not actually delete the files themselves (does not reclaim disk space), you'll see that using results_you_dont_want | delete does delete the results from the index.

Relevant documentation:
http://docs.splunk.com/Documentation/Splunk/6.1.4/Indexer/RemovedatafromSplunk
http://docs.splunk.com/Documentation/Splunk/6.1.4/SearchReference/Delete

0 Karma

Splunk Employee
Splunk Employee
0 Karma

Splunk Employee
Splunk Employee
0 Karma