Getting Data In

Retention doesn't work - what's wrong ?

mikesr
Explorer

Hi,

we configured retention policy based on the below parameters. However it doesn't work. There is no clue in the logs either.
The Splunk is running on Windows Server 2012. User of the suplunkd proces has Full Control rights to the archive DIR.
When the archive DIR was missing the frozen data were deleted along the frozenTimePeriodInSecs parameter. After adding the coldToFrozenDir parameter data are neither copied to the DIR nor deleted.
Can anyone help please.

[main]

frozenTimePeriodInSecs = 15552000

coldToFrozenDir = D:\SplunkArchive

Thanx
Roman

Tags (2)
0 Karma
2 Solutions

datasearchninja
Communicator

Are you sure that you have data that is a candidate for archive? Data is only frozen when all events in the bucket are older than the frozenTimePeriodInSecs.

View solution in original post

datasearchninja
Communicator

Try a search like this to list the times when you would expect buckets to roll to frozen (Replacing with the index you are interested in, and the timetofrozen amount):

| dbinspect index=main | search state!="hot" | table splunk_server bucketId endEpoch | eval frozenTimePeriodInSecs = "15552000" | eval frozentime=endEpoch+frozenTimePeriodInSecs | sort frozentime | convert TIMEFORMAT="%Y-%m-%d %H:%M:%S" ctime(frozentime) as frozentime

View solution in original post

datasearchninja
Communicator

Try a search like this to list the times when you would expect buckets to roll to frozen (Replacing with the index you are interested in, and the timetofrozen amount):

| dbinspect index=main | search state!="hot" | table splunk_server bucketId endEpoch | eval frozenTimePeriodInSecs = "15552000" | eval frozentime=endEpoch+frozenTimePeriodInSecs | sort frozentime | convert TIMEFORMAT="%Y-%m-%d %H:%M:%S" ctime(frozentime) as frozentime

mikesr
Explorer

This works prety well. I can see when the next bucket will be rolled over. Currently some data has been moved to the archive.

Thanks for your help.

0 Karma

datasearchninja
Communicator

Are you sure that you have data that is a candidate for archive? Data is only frozen when all events in the bucket are older than the frozenTimePeriodInSecs.

mikesr
Explorer

Not sure at all 😉 Looking that colddb dir is empty as well ... Any clue ?

0 Karma
Get Updates on the Splunk Community!

Observability Unlocked: Kubernetes Monitoring with Splunk Observability Cloud

  Ready to master Kubernetes and cloud monitoring like the pros?Join Splunk’s Growth Engineering team for an ...

Wrapping Up Cybersecurity Awareness Month

October might be wrapping up, but for Splunk Education, cybersecurity awareness never goes out of season. ...

🌟 From Audit Chaos to Clarity: Welcoming Audit Trail v2

🗣 You Spoke, We Listened  Audit Trail v2 wasn’t written in isolation—it was shaped by your voices.  In ...