Hello all, I'm finding the default indexer.conf settings too small, making various sourcetypes only searchable back about 4 months but I need a years worth/ability to search back to.
I've found numerous splunk posts on index.conf stanzas and settings, one more confusing than the next.
How the indexer stores indexes - Splunk Documentation
Configure index storage - Splunk Documentation
https://wiki.splunk.com/Deploy:BucketRotationAndRetention
I'm afraid I need a "explain to me like I'm 4 years old" post. What calculator or tool to use, and for what stanzas to effectively:
A) get search visibility into logs older than a few months
B) no longer roll buckets into Frozen (which seems to be aka 'deleted') but into archived, to facility easily restoring them when A) isn't as dialed in as thought.
I will try
So for each index you want to setup higher retention and don't want to delete frozen bucket, set following attributes
maxTotalDataSizeMB | Determines rolling behavior, cold to frozen. The maximum size of an index. When this limit is reached, cold buckets begin rolling to frozen. | 500000 (MB) |
frozenTimePeriodInSecs | Determines rolling behavior, cold to frozen. Maximum age for a bucket, after which it rolls to frozen. | 188697600 (in seconds; approx. 6 years) |
coldToFrozenDir | Location for archived data. Determines behavior when a bucket rolls from cold to frozen. If set, the indexer will archive frozen buckets into this directory just before deleting them from the index. | If you don't set either this attribute or coldToFrozenScript, the indexer will just log the bucket's directory name and then delete it once it rolls to frozen. |
OR |
coldToFrozenScript | Script to run just before a cold bucket rolls to frozen. If you set both this attribute and coldToFrozenDir, the indexer will use coldToFrozenDir and ignore this attribute. | If you don't set either this attribute or coldToFrozenDir, the indexer will just log the bucket's directory name and then delete it once it rolls to frozen. |
I will try
So for each index you want to setup higher retention and don't want to delete frozen bucket, set following attributes
maxTotalDataSizeMB | Determines rolling behavior, cold to frozen. The maximum size of an index. When this limit is reached, cold buckets begin rolling to frozen. | 500000 (MB) |
frozenTimePeriodInSecs | Determines rolling behavior, cold to frozen. Maximum age for a bucket, after which it rolls to frozen. | 188697600 (in seconds; approx. 6 years) |
coldToFrozenDir | Location for archived data. Determines behavior when a bucket rolls from cold to frozen. If set, the indexer will archive frozen buckets into this directory just before deleting them from the index. | If you don't set either this attribute or coldToFrozenScript, the indexer will just log the bucket's directory name and then delete it once it rolls to frozen. |
OR |
coldToFrozenScript | Script to run just before a cold bucket rolls to frozen. If you set both this attribute and coldToFrozenDir, the indexer will use coldToFrozenDir and ignore this attribute. | If you don't set either this attribute or coldToFrozenDir, the indexer will just log the bucket's directory name and then delete it once it rolls to frozen. |
I have a follow-up question on this explanation...
If you have an index with this configuration:
[index]
homePath = volume:primary/index/db
coldPath = volume:primary/index/colddb
thawedPath = $SPLUNK_DB/index/thaweddb
tstatsHomePath = volume:primary/index/datamodel_summary
maxTotalDataSizeMB = 102400
frozenTimePeriodInSecs = 31536000 (one year)
coldToFrozenDir = /splunkdata/frozen/$_index_name
If the maxTotalDataSizeMB is reached before frozenTimePeriodInSecs, does the data get deleted without archiving first or does it get archived first since coldToFrozenDir is configured?
You have a gift at breaking things down!