Bap*_*ias 3 purge retention grafana-loki
我想删除超过 31 天的块数据,所以我做了这样的配置
schema_config:
configs:
- from: 2020-10-24
store: boltdb-shipper
object_store: filesystem
schema: v11
index:
prefix: index_
period: 24h
storage_config:
boltdb_shipper:
active_index_directory: "/var/lib/loki/boltdb-shipper-active"
cache_location: "/var/lib/loki/boltdb-shipper-cache"
cache_ttl: 24h
shared_store: filesystem
filesystem:
directory: /var/lib/loki/chunks
chunk_store_config:
max_look_back_period: 0s
table_manager:
retention_deletes_enabled: true
retention_period: 31d
Run Code Online (Sandbox Code Playgroud)
但实际上删除从未发生过。
我是否忘记了配置中的某些内容?
洛基版本:2.4.1
小智 7
Grafana Loki 中的保留是通过表管理器或Compactor实现的。在您的情况下,boltdb-shipper 用于索引和块。对于本地存储而言,表管理器并不是一个很好的选择。
Compactor 保留将成为默认设置并获得长期支持。它支持针对每个租户和每个流用例的更细粒度的保留策略。
请查看此处的指南
compactor:
retention_enabled: true
retention_delete_delay: 2h <amount of hours to delay the retention period>
retention_delete_worker_count: 150
limits_config:
retention_period: [30d]
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6280 次 |
| 最近记录: |