Skip to content

Commit

Permalink
fix retention
Browse files Browse the repository at this point in the history
  • Loading branch information
akerl committed Apr 11, 2024
1 parent 78a8b84 commit 5f7f0d9
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions templates/loki.yaml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,20 @@ storage_config:
filesystem:
directory: /var/lib/loki/chunks

table_manager:
retention_deletes_enabled: <%= @retention_enabled %>
retention_period: <%= @retention_period %>
<% if @retention_enabled -%>
compactor:
working_directory: /var/lib/loki/retention
compaction_interval: 10m
retention_enabled: true
retention_delete_delay: 2h
retention_delete_worker_count: 150
delete_request_store: filesystem
<% end -%>

limits_config:
<% if @retention_enabled -%>
max_query_lookback: <%= @retention_period %>
retention_period: <%= @retention_period %>
<% end -%>
reject_old_samples: true
reject_old_samples_max_age: 168h

0 comments on commit 5f7f0d9

Please sign in to comment.