grafana / loki

Like Prometheus, but for logs.
https://grafana.com/loki
GNU Affero General Public License v3.0
24k stars 3.46k forks source link

loki retention policy not take effect #9123

Open alexg9781 opened 1 year ago

alexg9781 commented 1 year ago

Q1: I use loki 2.7.4, but when I try this document(https://grafana.com/docs/loki/v2.7.x/operations/storage/retention/#example-configuration) to retention old logs within 24 hours , but it could not take effect, is there any thing else I ignore ? Q2: If I use api to delete old logs, I found it could delete from my local disk

PS: my configuration

企业微信截图_1681371798238 企业微信截图_1681371798238

logs: 2023-04-13T15:42:41.577522634+08:00 stderr F level=info ts=2023-04-13T07:42:41.481094929Z caller=expiration.go:70 msg="overall smallest retention period 1678693361.481, default smallest retention period 1678693361.481"

alexey-sh commented 1 year ago

Have you found a way to fix it?