From a40b4e8ef1b634acdc68269bf93cc47e4a672afe Mon Sep 17 00:00:00 2001 From: Rik Veenboer Date: Sun, 12 Oct 2025 16:49:47 +0200 Subject: [PATCH] configure persisent storage --- compose.loki.yaml | 9 ++++--- loki/local-config.yaml | 61 ++++++++++++++++++------------------------ 2 files changed, 31 insertions(+), 39 deletions(-) diff --git a/compose.loki.yaml b/compose.loki.yaml index 26951ff..e7293c8 100644 --- a/compose.loki.yaml +++ b/compose.loki.yaml @@ -3,11 +3,12 @@ services: image: grafana/loki:3.5.3 container_name: loki restart: always + user: root ports: - "3100:3100" - # command: -config.file=/etc/loki/local-config.yaml - # volumes: - # - /opt/loki/local-config.yaml:/etc/loki/local-config.yaml:ro - # - /opt/loki/data:/loki + command: -config.file=/etc/loki/local-config.yaml + volumes: + - /opt/loki/local-config.yaml:/etc/loki/local-config.yaml:ro + - /opt/loki/data:/loki extra_hosts: - host:192.168.2.200 diff --git a/loki/local-config.yaml b/loki/local-config.yaml index 822196d..c6cb61e 100644 --- a/loki/local-config.yaml +++ b/loki/local-config.yaml @@ -1,46 +1,37 @@ +auth_enabled: false + +common: + replication_factor: 1 + path_prefix: /loki + server: http_listen_port: 3100 - http_server_read_timeout: 10m - http_server_write_timeout: 10m - http_server_idle_timeout: 10m -memberlist: - join_members: - - localhost:7946 - -limits_config: - per_stream_rate_limit: 0 - -query_range: - split_queries_by_interval: 10m - cache_results: true +ingester: + lifecycler: + ring: + kvstore: + store: inmemory + final_sleep: 0s + chunk_idle_period: 5m + chunk_retain_period: 30s schema_config: configs: - - from: 2021-08-01 - store: boltdb-shipper - object_store: s3 - schema: v11 + - from: 2020-10-24 + store: tsdb + object_store: filesystem + schema: v13 index: prefix: index_ period: 24h -common: - path_prefix: /loki - replication_factor: 1 - storage: - s3: - endpoint: host:9000 - insecure: true - bucketnames: loki - access_key_id: loki - secret_access_key: vryrquhchbdzgfjmlyctrdjiibobhhxc - s3forcepathstyle: true - ring: - kvstore: - store: memberlist +storage_config: + filesystem: + directory: /loki/chunks -ruler: - storage: - s3: - bucketnames: loki-ruler +limits_config: + allow_structured_metadata: true + +analytics: + reporting_enabled: false