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
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.
Thank you guys for your replies...
I am currently out of office. I will check in a week and keep you posted.
Regards
Julien
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
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
Reclaiming the disk space: