From bb0b117acd95ea58b91c731731e0a2d5a208808d Mon Sep 17 00:00:00 2001 From: David Wagner Date: Sun, 30 Jun 2024 12:30:51 +0200 Subject: [PATCH] loki: configure tsdb index from 2024-07-01 Reference https://grafana.com/docs/loki/latest/setup/migrate/migrate-to-tsdb/ --- modules/loki.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/modules/loki.nix b/modules/loki.nix index e152a69..0ecb177 100644 --- a/modules/loki.nix +++ b/modules/loki.nix @@ -5,6 +5,7 @@ let # https://grafana.com/docs/loki/latest/configuration/examples/#complete-local-config configuration = { auth_enabled = false; + common.path_prefix = "/var/lib/loki"; server.http_listen_port = httpPort; server.log_level = "warn"; @@ -34,12 +35,24 @@ let period = "168h"; }; } + { + from = "2024-07-01"; + store = "tsdb"; + object_store = "filesystem"; + schema = "v13"; + index = { + prefix = "index_"; + period = "24h"; + }; + } ]; }; storage_config = { boltdb.directory = "/tmp/loki/index"; filesystem.directory = "/tmp/loki/chunks"; + tsdb_shipper.active_index_directory = "/var/lib/loki/tsdb-index"; + tsdb_shipper.cache_location = "/var/lib/loki/tsdb-cache"; }; limits_config = {