gpt4 book ai didi

purge - 表管理器不会清除 loki 2.4 中的 block

转载 作者:行者123 更新时间:2023-12-05 08:36:07 24 4
gpt4 key购买 nike

我想删除超过 31 天的 block 数据,所以我做了这样的配置

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

但实际上删除从未发生过。

我是否忘记了配置中的某些内容?

洛基版本:2.4.1

最佳答案

Grafana Loki 中的保留是通过Table ManagerCompactor 实现的。在您的情况下,boltdb-shipper 用于索引和 block 。对于本地存储,表管理器并不是一个很好的选择。

Compactor 保留将成为默认值并提供长期支持。它支持针对每个租户和每个流用例的更精细的保留策略。

请查看Guide here

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]

关于purge - 表管理器不会清除 loki 2.4 中的 block ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70492906/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com