Compator is not allowed to be used within SimpleScalable deployment model.
We have set retention_streams and global retention. Yet, with streams, it lived for indefinite and never got deleted
We’re relying on promtail to add custom label to log stream and its working fine.
Then in Loki, we would like to retain logs based on this custom label.
Dropping is working fine as promtail won’t push logs to loki. Yet, for streams that should live for 24h, 48h or more. Loki never deleted it from S3 Bucket
Compactor replica count seems to be 0 because that’s how it is recommended as per the Simple Scalable Deployment mode (see: Install the simple scalable Helm chart | Grafana Loki documentation for example), and compactor is already included in the backend in this deployment mode.
If we try to set compactor replica count to anything other than 0 now, this warning would pop up:
So, what is the correct approach to take here? Say if we want to have retention applied per stream so that we can keep some important logs, and discard the rest.
The documentation here could be improved to include relevant helm values and how simple scalable mode interacts with the compactor. Log retention | Grafana Loki documentation . From an infrastructure side this can be managed via a lifecycle rule in S3, however it is unclear what happens to one time created files such as seed.json, since this file will be deleted after lifecycle expiry.