Loki retention not working. io/name: loki data: loki-tenant .


Loki retention not working Jul 27, 2022 · By default, when table_manager. Internal policy on log files is that we store no more than 14 days worth of logs. I am expecting that the chunks will be deleted after every 24hrs. loki: limits_config: retention_period: 24h enforce_metric_name: false compactor: retention_enabled: true retention_delete_delay: 1h table_manager: retention_deletes_enabled: true retention . 19. Without this, the compactor will not delete old logs. Current result: selector: ‘{protocol=“protocol-log-3d”}’ is not deleting log entries older than 3 days (stream retention), nor older than 5 days (global retention) Loki runs in a Kubernetes Cluster, Deployment via Helm, image: repository: grafana/loki tag Oct 27, 2021 · After changing the default to 24h and adding the retention_stream rules, it stopped working. Jan 12, 2022 · Hi, I have below configuration for grafana loki . The retention period must be a multiple of the index and chunks table period , configured in the period_config block. retention_enabled: trueEnables the retention policy enforcement in Loki. Both seemed to work in that I can’t query data older than 14 days, but I am looking to verify that May 21, 2024 · I am trying to set a log retention policy for loki so that the logs will be deleted after 28 days. I also want to set the query roll back to 28 days but no matter what I do , the limit stays : 30d1h global: dnsService… Nov 20, 2024 · Hi, im trying to get Loki retention overrides to work Global retention timings seems to be working, but not the override. The minimum retention period is 24h . Need help in fixing the log retention issue. here is an extract of my conf : deploymentMode: SimpleScalable loki: schemaConfig: configs: - from: "2024-08-19" store: tsdb index: prefix: loki_index_ period: 24h object_store: gcs schema: v13 storage: type: 'gcs' bucketNames: chunks: mybasebucket_loki-chunks ruler: mybasebucket_loki-ruler # admin: mybasebucket_loki Apr 19, 2023 · Maybe its not working because of this: retention_delete_delay - Delay after which chunks will be fully deleted during retention, default: 2h. These files are kept there for 2 hours or whatever is set in retention_delete_delay. After retention_delete_delay is passed, loki will delete the chunks. See Retention | Grafana Loki documentation. First, we’ve made the configmap and it’s like this: extraObjects: - apiVersion: v1 kind: ConfigMap metadata: name: loki-tenant-overrides-rules labels: app. 1: 41: July 23, 2024 Helm installed loki with pvc, compactor retention not work. What could be the issue? Thank you. By default the compactor. I have configured this in loki using the instructions from the following page: First I tried the method using the compactor, then the option using the table manager. Note that it doesn't seem to throw any errors, it just stopped working. – atlau Commented Jun 29, 2023 at 12:15 Dec 3, 2024 · compactor. Not having any of the logs mentionned above means that the retention process is not started. retention_delete_delay: 2hIntroduces a delay of 2 Oct 14, 2021 · The streams are selected correctly within Grafana explore-view with Loki source. May 29, 2024 · Loki-stack retention_period not working. Grafana Loki. If you have a lifecycle policy configured on the object store, please ensure that it is longer than the retention period. I´m running loki in fully distributed mode, and with helm version 6. kubernetes. This topic was automatically closed 365 days after the last reply. Apr 4, 2024 · I have set a retention period in my yml table_manager: retention_deletes_enabled: true retention_period: 730h But it does not seem to clean up my chunks on the system. retention_enabled flags are not set, then logs sent to Loki live forever. @priyanka1806 Table_Manager is unnecessary if you are using a compactor. io/name: loki data: loki-tenant Jul 22, 2024 · Hello, I am using Kubernetes Helm to deploy the Loki-stack. retention-enabled flag is not set, so the logs sent to Loki live forever. What have I done already: Tried the same without the regexp rules (more rules): not working; Tried the same with h instead of d: not working Jan 29, 2025 · Hello everyone, We’ve installed Loki in SimpleScalable mode connected to a MinIO instance onprem, right now we’re trying to implement data renention having multiple tenants activated. Important Notes Hi, I have below configuration for grafana loki . May 31, 2023 · Hello, Working on configuring a loki instance. compactor. auth_enabled: false server: http_listen_port: 3100 ingester: lifecycler: address: ring Dec 27, 2021 · Hello, I want to purge all chunks older than 31 days in loki so I set this config schema_config: configs: - from: 2020-10-24 store: boltdb-shipper object_store: filesystem schema: v11 inde… Jun 26, 2022 · From my experience, this is how retention works: Compactor runs in loops every compaction_interval, from docs:. 1: 234: Hi, I have below configuration for grafana loki . But it is not working as expected. Am i missing something? ls -ltr | head total … Jul 31, 2020 · Retention in Grafana Loki is achieved through the Compactor. I expected that this setup would delete chunks every 24 hours, but it doesn’t seem to be working as expected. 0, with this configuration The tenant i´m trying to override the retention for is named “team_x_logs” From what i can see, the configmap is created and mounted to the correct path on the compactor Aug 29, 2024 · Hello everyone, I am having trouble configuring loki with GCS and retention. The path should be something like /var/loki/compactor/retention/markers. The Compactor loops to apply compaction and retention at every compaction_interval, or as soon as possible if running behind. Mar 1, 2024 · Try using compactor instead and disable table manager. retention_deletes_enabled or compactor. tpkkcor lzhers vsgtm bfbfd irjem lqlk tryc pdwgr tnsgq cmla nzw mmnes fkeubbe jhfz dxtutps