How to store loki-chunks folder inside one s3 bucket

I am new to helm , prometheus-grafana and loki services.
I have installed loki-stack in my eks cluster through helm chart for log monitoring of my eks pods by using the below command.

helm install loki-stack grafana/loki-stack -n monitoring

loki-chunks folder is getting saved in one of the eks node , which eventually causing high memory consumption.
I did some work around that if we can save the chunks folder in s3 bucket or not.
I got few answers, that in loki values.yaml file we can mention s3 details for s3 implementation , which is mentioned here https://stackoverflow.com/questions/71959031/how-to-use-s3-as-storage-for-loki-logs.

But if i am passing the command helm inspect values grafana/loki-stack >> values.yaml
I am getting below response.

loki:
  enabled: true
  isDefault: true

promtail:
  enabled: true
  config:
    lokiAddress: http://{{ .Release.Name }}:3100/loki/api/v1/push

fluent-bit:
  enabled: false

grafana:
  enabled: false
  sidecar:
    datasources:
      enabled: true
      maxLines: 1000
  image:
    tag: 8.3.5

prometheus:
  enabled: false
  isDefault: false

filebeat:
  enabled: false
  filebeatConfig:
    filebeat.yml: |
      # logging.level: debug
      filebeat.inputs:
      - type: container
        paths:
          - /var/log/containers/*.log
        processors:
        - add_kubernetes_metadata:
            host: ${NODE_NAME}
            matchers:
            - logs_path:
                logs_path: "/var/log/containers/"
      output.logstash:
        hosts: ["logstash-loki:5044"]

logstash:
  enabled: false
  image: grafana/logstash-output-loki
  imageTag: 1.0.1
  filters:
    main: |-
      filter {
        if [kubernetes] {
          mutate {
            add_field => {
              "container_name" => "%{[kubernetes][container][name]}"
              "namespace" => "%{[kubernetes][namespace]}"
              "pod" => "%{[kubernetes][pod][name]}"
            }
            replace => { "host" => "%{[kubernetes][node][name]}"}
          }
        }
        mutate {
          remove_field => ["tags"]
        }
      }
  outputs:
    main: |-
      output {
        loki {
          url => "http://loki:3100/loki/api/v1/push"
          #username => "test"
          #password => "test"
        }
        # stdout { codec => rubydebug }
      }

I am not getting where to mention the s3 configurations in the above values.yaml file.
Can some one help ?
It will be really appreciable.
Thanks.

have you looked at the official configuration documentation? there is an entire section for configuring for s3:

i would start with the above and modify your values.yaml accordingly.

Thanks a lot.
I will look for the documentation.
If you can modify my values.yaml accordingly , it will be a great help.

Also would suggest using the single binary helm chart since it’s more up-to-date:

Hi,
I have tried installing grafana/loki mentioned in the github link which you have shared.
After installing i am getting below endpoints and out of those end points nothing is getting added successfully as a grafana data source for accessing the pod logs.

grafana-loki

I am able to add loki as a grafana data source with my initial configurations which i have shared already for seeing the pod logs , but with this s3 configuration section is not working.

Can you please help me out ?
Thanks

Hi @joelc
Please refer to the above message.
Thank you

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.