Newbie Question on Loki data storage : minIO

Hi,

I am a newbie into Loki on minIO and have a few questions in my head with regards to their configuration that am sure you experts would help me with,

  1. For configuration of minIO, is the storage_config: and schema_config: necessary, or just storage: is sufficient?
  2. If the storage_config.aws.s3 is added with the details, would the storage.s3 also be required to be updated with the same entries?
  3. How does the perfect compactor configuration look? I picked the below from the Internet pages but not sure if they are right.
          compactor:
            retention_enabled: true
            shared_store: s3

My Loki chart looks as below,

      values: |
        loki:
          storage:
            type: s3
            s3:
              s3: s3://minioadmin:minioadmin@up-monitoring-minio.up-monitoring.svc.cluster.local.:9000/chunks
              # endpoint: http://minio.minio:9000
              s3ForcePathStyle: true
              insecure: true
          enterprise:
            enabled: false
          revisionHistoryLimit: 3
          auth_enabled: false
          commonConfig:
            path_prefix: /var/loki
            replication_factor: 1

          # ingester:
          #   wal:
          #     enabled: true
          #     dir: /var/loki/wal
          #   lifecycler:
          #     address: 127.0.0.1
          #     ring:
          #       kvstore:
          #         store: inmemory
          #       replication_factor: 1
          #     final_sleep: 0s
          #   chunk_idle_period: 5m
          #   chunk_retain_period: 30s
          #   max_transfer_retries: 1

          compactor:
            retention_enabled: true
            shared_store: s3

          # limits_config:
          #   max_cache_freshness_per_query: 10m
          #   retention_period: 48h
          #   retention_stream:
          #     - selector: '{app="*"}'
          #       priority: 1
          #       period: 720h

          # storage_config:
          #   boltdb_shipper:
          #     shared_store: s3
          #   aws:
          #     s3: s3://minioadmin:minioadmin@up-monitoring-minio.up-monitoring.svc.cluster.local.:9000/chunks
          #     s3forcepathstyle: true

          # schema_config:
          #   configs:
          #     - from: "2022-10-19"
          #       store: boltdb-shipper
          #       object_store: s3
          #       schema: v11
          #       index:
          #         period: 24h
          #         prefix: loki_index_

        monitoring:
          rules:
            enabled: true
            alerting: true
            namespace: up-monitoring
            annotations: {}
            labels:
              matchLabels:
                prometheus: k8s
                role: alert-rules
            additionalGroups:
            - name: additional-loki-rules
              rules:
                - record: job:loki_request_duration_seconds_bucket:sum_rate
                  expr: sum(rate(loki_request_duration_seconds_bucket[1m])) by (le, job)
                - record: job_route:loki_request_duration_seconds_bucket:sum_rate
                  expr: sum(rate(loki_request_duration_seconds_bucket[1m])) by (le, job, route)
                - record: node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate
                  expr: sum(rate(container_cpu_usage_seconds_total[1m])) by (node, namespace, pod, container)

          alerts:
            enabled: true
            namespace: up-monitoring
            annotations: {}
            labels: {}
          serviceMonitor:
            enabled: true
            namespace: up-monitoring
            namespaceSelector: {}
            annotations: {}
            labels: {}
            interval: null
            scrapeTimeout: null
            relabelings: []
            scheme: http
            tlsConfig: null

        read:
          replicas: 2
          autoscaling:
            enabled: true

        write:
          replicas: 2
          persistence:
            size: 5Gi

Check out this tutorial I wrote on Loki and MinIO. I hope you find it helpful. How To Deploy Grafana Loki and Save Data to MinIO and a video MinIO with #Grafana Loki - Session 1: Overview of Storage, Retrieval and Use of Log Files - YouTube

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