Splunk Enterprise

How to clean index data after every one week?

Ashwini008
Builder

Hi, 

How can i delete the data in index after every one week? I came across Splunk answers and documents it is mentioned that we cannot completey clear index data as it depends on two attributes maxTotalDataSizeMB and frozenTimePeriodInSecs . I am confused 😕

So i am using this index data in dashboard and basically i don't want to show the old data(P.s dealing with millions of user data so sorting/deduping is not an option).Now every week new data comes to the index so when it happens i have to clear the old data existing in my index .

Irrespective of whether index has reached max default size or Frozen time period or maxHotSpanSecs  has reached its value how can i set the attributes in the index so that index data is empty every week?

Thanks!

0 Karma

PickleRick
SplunkTrust
SplunkTrust

You're mixing two different things.

One is the actual data retention - how long you keep the data in the index in case you want to search it later. And here indeed those two parameters are responsible for when splunk choses to "evict" old data and remove a bucket (remember that splunk doesn't expire single events but whole buckets).

Another thing is timerange of your search. You set it either using timepicker or specifying "earliest" and "latest" parameters. You can also limit your users to some subset of data available if you don't want some of them to peek too far into the past (but I don't remember if you can set it per index or only globally for user).

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Set the time frame on your search so that it starts at the beginning of the week

... earliest=@w
0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...