【发布时间】:2023-02-15 17:01:47
【问题描述】:
我将我的存储配置为在我的 Loki 实例中使用本地文件系统。我正在使用 Helm 图表安装 loki-stack,我创建了一个 yaml 文件来覆盖一些默认值(我想将默认的 28 天保留计划修改为 3 个月的保留计划):
(我的 values.yaml 文件的内容)
loki:
chunk_store_config:
max_look_back_period: 740h
compactor:
shared_store: filesystem
working_directory: /data/loki/boltdb-shipper-compactor
retention_enabled: true
limits_config:
retention_period: 740h
schema_config:
configs:
- from: "2020-10-24"
index:
period: 24h
prefix: index_
object_store: filesystem
schema: v11
store: boltdb-shipper
storage_config:
boltdb_shipper:
active_index_directory: /data/loki/boltdb-shipper-active
cache_location: /data/loki/boltdb-shipper-cache
cache_ttl: 24h
shared_store: filesystem
filesystem:
directory: /data/loki/chunks
table_manager:
retention_deletes_enabled: true
retention_period: 740h
我正在使用以下命令:
helm install -f values.yaml loki-stack grafana/loki-stack --set loki.enabled=true,promtail.enabled=false --namespace=my-test-ns
当我运行命令时,堆栈安装正确并且它在我的集群中运行得很好但是我在 yaml 文件中配置的数据没有应用!! 我尝试了一千种不同的组合来尝试让它工作,但它不起作用。每次尝试后,我都会在我的 pod 中启动一个 shell 并检查 /etc/loki/loki.yaml 下的配置,我只看到为 loki 实例设置的默认配置。
有人可以澄清如何正确修改 Loki 上的保留期,因为我使用的方法是官方 Grafana 页面上描述的方法,但它不起作用(至少在 helm 和集群环境中)!
【问题讨论】:
标签: kubernetes grafana-loki retention loki