Filesystem retention not working

Hello,

I want to purge all chunks older than 31 days in loki so I set this config

schema_config:
  configs:
    - from: 2020-10-24
      store: boltdb-shipper
      object_store: filesystem
      schema: v11
      index:
        prefix: index_
        period: 24h

storage_config:
  boltdb_shipper:
    active_index_directory: "/var/lib/loki/boltdb-shipper-active"
    cache_location: "/var/lib/loki/boltdb-shipper-cache"
    cache_ttl: 24h 
    shared_store: filesystem
  filesystem:
    directory: /var/lib/loki/chunks

compactor:
  working_directory: "/var/lib/loki/boltdb-shipper-compactor"
  shared_store: filesystem

chunk_store_config:
  max_look_back_period: 0s

table_manager:
  retention_deletes_enabled: true
  retention_period: 31d

version: 2.4.1
but this is not working.
Did I forget something to set ?

Hi,

Did you wait for deletion, there is a relevant discussion in Github i suggest you have a look at it first :

Hope it helps.

Good Luck

actually starting in version 2.4.0 it’s necessary to update the configuration to purge old data, by

  • defining the retention period in section limits_config
  • activate the retention in section compactor

which gives

 compactor:
  retention_enabled: true
limits_config:
  retention_period: [30d]

this is explained in the upgrade document I did not know about

Hello,The chunks are deleted or not? I’m having a problem with full disk space

Same here, getting disk space issue with loki 2.4.1. Did you got the solution

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.