簡體   English   中英

如何使用 S3 作為 Loki 日志的存儲?

[英]How to use S3 as storage for Loki logs?

我對 Kubernetes、Helm 和 Loki 還很陌生。

我已經使用 Helm 圖表在我的 minikube 集群上部署了 Loki-stack,並且我正在嘗試使用 S3 存儲作為 Loki 日志的存儲。

我嘗試將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

我確保自定義區域、存儲桶名稱、端點等。但 Loki 並沒有在那里存儲任何日志。 我需要一些幫助來告訴我我可能遺漏了什么或做錯了什么?

我一直在你的位置。 我找到的解決方案是使用 Single Store Loki configuration Single Store Loki (boltdb-shipper index type) 另外,我建議您使用 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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM