prometheus(或 grafana)查询以评估 grafana loki 使用的存储?

prometheus (or grafana) query to evaluate storage used by grafana loki?

如何通过prometheus查询计算grafana loki使用的存储空间?是否有特定的指标来监控这一点?

我使用 HELM chart 作为 loki 安装的 helm chart,结果它写入了节点的存储。我猜它正在使用 boltdb-shipper.

helm repo add grafana https://grafana.github.io/helm-charts
helm repo update

helm upgrade --install promtail grafana/promtail \
    --create-namespace \
    --namespace monitoring \
    --values cluster/production/charts/loki/values.promtail.yaml 

helm upgrade --install loki grafana/loki \
    --create-namespace \
    --namespace monitoring \
    --values cluster/production/charts/loki/values.loki.yaml 

这些指标可以帮助您:

# HELP loki_ingester_chunk_size_bytes Distribution of stored chunk sizes (when stored).
# TYPE loki_ingester_chunk_size_bytes histogram
loki_ingester_chunk_size_bytes_bucket
loki_ingester_chunk_size_bytes_sum
loki_ingester_chunk_size_bytes_count
# HELP loki_ingester_chunk_stored_bytes_total Total bytes stored in chunks per tenant.
# TYPE loki_ingester_chunk_stored_bytes_total counter
loki_ingester_chunk_stored_bytes_total