loki 1.5 k8s boltdb-shipper was

Created on 19 Jul 2020  路  3Comments  路  Source: grafana/loki

Hello.

I'm trying to use boltdb-shipper in k8s to store both indexes and chunks in s3 object storage.

this is my config

     schema_config:
        configs:
        - from: 2020-07-01
          store: boltdb-shipper
          object_store: aws
          schema: v11
          index:
            prefix: loki_index_
            period: 168h
      server:
        http_listen_port: 3100
      storage_config:
        aws:
          s3: s3://eu-north-1/logs-prod-loki
        boltdb_shipper:
          active_index_directory: /loki/index
          shared_store: s3
          cache_location: /loki/boltdb-cache

But when I try to start Loki container I get such error:

level=error ts=2020-07-19T07:35:43.781005486Z caller=log.go:140 msg="error initialising loki" err="mkdir /loki/index: read-only file system\nerror creating index client\ngithub.com/cortexproject/cortex/pkg/chunk/storage.NewStore\n\t/src/loki/vendor/github.com/cortexproject/cortex/pkg/chunk/storage/factory.go:153\ngithub.com/grafana/loki/pkg/storage.NewStore\n\t/src/loki/pkg/storage/store.go:53\ngithub.com/grafana/loki/pkg/loki.(*Loki).initStore\n\t/src/loki/pkg/loki/modules.go:280\ngithub.com/grafana/loki/pkg/loki.(*Loki).initModuleServices\n\t/src/loki/pkg/loki/loki.go:192\ngithub.com/grafana/loki/pkg/loki.New\n\t/src/loki/pkg/loki/loki.go:134\nmain.main\n\t/src/loki/cmd/loki/main.go:76\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:203\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1357\nerror initialising module: store\ngithub.com/grafana/loki/pkg/loki.(*Loki).initModuleServices\n\t/src/loki/pkg/loki/loki.go:194\ngithub.com/grafana/loki/pkg/loki.New\n\t/src/loki/pkg/loki/loki.go:134\nmain.main\n\t/src/loki/cmd/loki/main.go:76\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:203\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1357"

Can you help me please ?

Most helpful comment

Isn't the config above going to throw

level=error ts=2020-08-18T13:17:43.038012907Z caller=main.go:86 msg="validating config" err="invalid schema config: boltdb-shipper works best with 24h periodic index config. Either add a new config with future date set to 24h to retain the existing index or change the existing config to use 24h period"

All 3 comments

Hi!
Got the same, what was the problem? How did you solve it?

The correct config is:
config: auth_enabled: false ingester: chunk_idle_period: 3m chunk_block_size: 262144 chunk_retain_period: 1m max_transfer_retries: 0 lifecycler: ring: kvstore: store: inmemory replication_factor: 1 limits_config: enforce_metric_name: false reject_old_samples: true reject_old_samples_max_age: 168h schema_config: configs: - from: 2020-07-01 store: boltdb-shipper object_store: aws schema: v11 index: prefix: loki_index_ period: 168h server: http_listen_port: 3100 storage_config: aws: s3: s3://AKIA...:oJZFw....@eu-north-1/prod-loki boltdb_shipper: active_index_directory: /data/loki/index shared_store: s3 cache_location: /data/loki/boltdb-cache chunk_store_config: max_look_back_period: 0s table_manager: retention_deletes_enabled: false retention_period: 0s

Isn't the config above going to throw

level=error ts=2020-08-18T13:17:43.038012907Z caller=main.go:86 msg="validating config" err="invalid schema config: boltdb-shipper works best with 24h periodic index config. Either add a new config with future date set to 24h to retain the existing index or change the existing config to use 24h period"
Was this page helpful?
0 / 5 - 0 ratings

Related issues

daixiang0 picture daixiang0  路  6Comments

steven-sheehy picture steven-sheehy  路  4Comments

Mario-Hofstaetter picture Mario-Hofstaetter  路  4Comments

Horkyze picture Horkyze  路  5Comments

Menda picture Menda  路  5Comments