Log retention configuration for loki is not working

Hi, I have below configuration for grafana loki . I am expecting that the chunks will be deleted after every 24hrs. But it is not working as expected.

auth_enabled: false

server:
http_listen_port: 3100

ingester:
lifecycler:
address:
ring:
kvstore:
store: inmemory
replication_factor: 1
final_sleep: 0s
chunk_idle_period: 5m
chunk_retain_period: 30s

schema_config:
configs:

  • from: 2022-01-11
    store: boltdb
    object_store: filesystem
    schema: v11
    index:
    prefix: index_
    period: 24h

storage_config:
boltdb:
directory: /u01/app/grafana/loki/index

filesystem:
directory: /u01/app/grafana/loki/chunks

compactor:
working_directory: /u01/app/grafana/loki
shared_store: filesystem
compaction_interval: 10m
retention_enabled: true
retention_delete_delay: 1h
retention_delete_worker_count: 100

limits_config:
enforce_metric_name: false
reject_old_samples: true
reject_old_samples_max_age: 24h
retention_period: 24h

chunk_store_config:
max_look_back_period: 24h

table_manager:
retention_deletes_enabled: true
retention_period: 24h

Need help in fixing the log retention issue.

1 Like

But it is not working as expected.

Are they not being deleted at all, to early, or too late?

They are not being deleted at all.