Is there a beginner-friendly example anywhere on how to configure data retention? I think this is really important for production users.
I just installed Loki using helm with this configuration.
config:
table_manager:
retention_deletes_enabled: true
retention_period: 120h
And then I got this error retention period should now be a multiple of periodic table duration. What is the periodic table duration? Can we have an example in the documentation, please. Thanks.
@bzon period config is part of your schema config. You can find period configuration here https://github.com/grafana/loki/tree/master/docs/configuration#period_config
Thanks @adityacs I will test it out
Hi @adityacs if I want to have a 15d data retention, all data deleted, can you help me achieve this? I tried using the period_config and it is not very straightforward. There are two duration there with a default of 168h.
period under index is what you are looking for. chunk is for storing chunks in tables and it is not a good idea to store loki chunks in tables because their size is big compared to cortex chunks.
Set retention to multiple of index.period.
thanks @sandeepsukhani my final working configuration now is:
config:
table_manager:
retention_deletes_enabled: true
retention_period: 336h # or 14d, because the default index period is 168h