Change the default retention period in Openshift Logging
Environment
- Red Hat OpenShift Container Platform (RHOCP)
- 4
- Red Hat OpenShift Logging (RHOL)
- 5
Issue
- Is it possible to tune the default OpenShift Logging retention period?
Resolution
Elasticsearch
For configuring the retention period in Elasticsearch refer to [configuring log retention time](https://docs.openshift.com/container-platform/4.14/logging/log_storage/logging-config-es-store.html#cluster-logging-elasticsearch-retention_logging-config-es-store).
For Elasticsearch, it is also possible to configure log retention per namespace for OpenShift Elasticsearch log store, and configure log retention on OpenShift Elasticsearch operator using the maxSize parameter.
LokiStack
For configuring the retention period in LokiStack refer to [enabling stream-based retention with Loki](https://docs.openshift.com/container-platform/4.14/logging/log_storage/cluster-logging-loki.html#logging-loki-retention_cluster-logging-loki).
Root Cause
It is possible to configure the log retention in both Elasticsearch and LokiStack.
Components
Category
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.