Skip to content

Commit

Permalink
update Docs: update Retention section on Operations doc file (#876)
Browse files Browse the repository at this point in the history
update retention section in docs to recommend retention to be twice the duration of periodic table
  • Loading branch information
BouchaaraAdil authored and sandeepsukhani committed Aug 9, 2019
1 parent 3d1f39f commit f5820d4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ For more information about mixins, take a look at the [mixins project docs](http

Retention in Loki can be done by configuring Table Manager. You need to set a retention period and enable deletes for retention using yaml config as seen [here](https://github.com/grafana/loki/blob/39bbd733be4a0d430986d9513476a91334485e9f/production/ksonnet/loki/config.libsonnet#L128-L129) or using `table-manager.retention-period` and `table-manager.retention-deletes-enabled` command line args. Retention period needs to be a duration in string format that can be parsed using [time.Duration](https://golang.org/pkg/time/#ParseDuration).

**[NOTE]** Retention period should be at least twice the [duration of periodic table config](https://github.com/grafana/loki/blob/347a3e18f4976d799d51a26cee229efbc27ef6c9/production/helm/loki/values.yaml#L53), which currently defaults to 7 days.

In the case of chunks retention when using S3 or GCS, you need to set the expiry policy on the bucket that is configured for storing chunks. For more details check [this](https://docs.aws.amazon.com/AmazonS3/latest/dev/object-lifecycle-mgmt.html) for S3 and [this](https://cloud.google.com/storage/docs/managing-lifecycles) for GCS.

Currently we only support global retention policy. A per user retention policy and API to delete ingested logs is still under development.
Expand Down

0 comments on commit f5820d4

Please sign in to comment.