From 403d6d162fb2ebeaa57ac4a6ab895c17dd320193 Mon Sep 17 00:00:00 2001 From: sefidel Date: Sat, 15 Jun 2024 11:58:37 +0900 Subject: feat(modules/metrics): migrate loki to 3.0 --- modules/services/metrics.nix | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'modules/services') diff --git a/modules/services/metrics.nix b/modules/services/metrics.nix index 55f3bee..b2211f8 100644 --- a/modules/services/metrics.nix +++ b/modules/services/metrics.nix @@ -52,15 +52,18 @@ in max_chunk_age = "1h"; chunk_target_size = 1048576; # 1.5M chunk_retain_period = "30s"; - max_transfer_retries = 0; + wal = { + enabled = true; + dir = "/tmp/loki-wal"; + }; }; schema_config.configs = [ { from = "2023-02-24"; - store = "boltdb-shipper"; + store = "tsdb"; object_store = "filesystem"; - schema = "v11"; + schema = "v13"; index = { prefix = "index_"; period = "24h"; @@ -69,11 +72,10 @@ in ]; storage_config = { - boltdb_shipper = { - active_index_directory = "/var/lib/loki/boltdb-shipper-active"; - cache_location = "/var/lib/loki/boltdb-shipper-cache"; + tsdb_shipper = { + active_index_directory = "/var/lib/loki/tsdb-index"; + cache_location = "/var/lib/loki/tsdb-cache"; cache_ttl = "24h"; - shared_store = "filesystem"; }; filesystem.directory = "/var/lib/loki/chunks"; @@ -86,10 +88,6 @@ in retention_period = "120h"; }; - chunk_store_config = { - max_look_back_period = "0s"; - }; - table_manager = { retention_deletes_enabled = true; retention_period = "120h"; @@ -97,7 +95,7 @@ in compactor = { working_directory = "/var/lib/loki"; - shared_store = "filesystem"; + delete_request_store = "filesystem"; compactor_ring.kvstore.store = "inmemory"; }; }; -- cgit 1.4.1