[英]How to use S3 as storage for Loki logs?
I am fairly new to Kubernetes, Helm and Loki.我对 Kubernetes、Helm 和 Loki 还很陌生。
I have deployed Loki-stack on my minikube cluster using Helm charts and I am trying to use S3 storage as storage for Loki logs.我已经使用 Helm 图表在我的 minikube 集群上部署了 Loki-stack,并且我正在尝试使用 S3 存储作为 Loki 日志的存储。
I tried adding the following from the documentation of Loki to my custom chart and customizing it to my running S3 instance.我尝试将Loki 文档中的以下内容添加到我的自定义图表中,并将其自定义为我正在运行的 S3 实例。
schema_config:
configs:
- from: 2020-05-15
store: aws
object_store: s3
schema: v11
index:
prefix: loki_
storage_config:
aws:
bucketnames: bucket_name1, bucket_name2
endpoint: s3.endpoint.com
region: s3_region
access_key_id: s3_access_key_id
secret_access_key: s3_secret_access_key
insecure: false
sse_encryption: false
http_config:
idle_conn_timeout: 90s
response_header_timeout: 0s
insecure_skip_verify: false
s3forcepathstyle: true
I made sure to customize the region, bucket names, endpoint, etc. But Loki is not storing any logs whatsoever there.我确保自定义区域、存储桶名称、端点等。但 Loki 并没有在那里存储任何日志。 I would like some help to show me what I might be missing or doing wrong?
我需要一些帮助来告诉我我可能遗漏了什么或做错了什么?
I've been in your place.我一直在你的位置。 The soution I found was to use the Single Store Loki configuration Single Store Loki (boltdb-shipper index type) .
我找到的解决方案是使用 Single Store Loki configuration Single Store Loki (boltdb-shipper index type) 。 Also, I recomend you to use the common section to configure the shared_sotrage in an easier way and include the compactor configuration.
另外,我建议您使用 common 部分以更简单的方式配置 shared_sotrage 并包含 compactor 配置。
common:
path_prefix: /tmp/loki
storage:
s3:
bucketnames: bucket-name
region: aws-region
access_key_id: Key
secret_access_key: Secret
storage_config:
boltdb_shipper:
active_index_directory: /tmp/loki/active
shared_store: s3
cache_location: /tmp/loki/cache
cache_ttl: 24h
compactor:
working_directory: /tmp/loki/compactor
shared_store: s3
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.