You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With Logging version 5.6 and higher, you can configure retention policies based on log streams. Rules for these may be set globally, pertenant, or both. If you configure both, tenant rules apply before global rules.
10
+
With Logging version 5.6 and higher, you can configure retention policies based on log streams. Rules for these might be set globally, per-tenant, or both. If you configure both, tenant rules apply before global rules.
Although logging version 5.9 and higher supports schema v12, v13 is recommended.
16
+
* Although logging version 5.9 and higher supports schema v12, v13 is recommended.
17
+
18
+
* Stream-based retention does not manage the retention for stored logs. You can configure global retention periods for stored logs to a supported maximum of 30 days in your object storage.
16
19
====
17
20
21
+
.Prerequisites
22
+
23
+
* You have administrator permissions.
24
+
* You have installed the {loki-op}.
25
+
* You have installed the {oc-first}.
26
+
27
+
.Procedure
28
+
18
29
. To enable stream-based retention, create a `LokiStack` CR:
<1> Sets retention policy for all log streams. *Note: This field does not impact the retention period for stored logs in object storage.*
66
+
<1> Sets retention policy for all log streams. This field does not impact the retention period for stored logs in object storage.
55
67
<2> Retention is enabled in the cluster when this block is added to the CR.
56
-
<3> Contains the link:https://grafana.com/docs/loki/latest/logql/query_examples/#query-examples[LogQL query] used to define the log stream.spec:
57
-
limits:
58
-
59
-
.Example per-tenant stream-based retention for AWS
68
+
<3> Contains the link:https://grafana.com/docs/loki/latest/logql/query_examples/#query-examples[LogQL query] used to define the log stream`spec.limits`.
0 commit comments