简体   繁体   中英

loki reject_old_samples_max_age vs retention_period

We're using latest loki, but confused how to define the retention properly:

What is the difference between:

  • reject_old_samples_max_age
  • retention_period

What takes the priority?

In the example below, will the data be deleted after 168h or 336h?

limits_config:
      enforce_metric_name: false
      reject_old_samples: true
      reject_old_samples_max_age: 168h
      max_cache_freshness_per_query: 10m
      retention_period: 336h

Data will be deleted after 336h because the "retention_period" parameter defines that. The "reject_old_samples" (true or false) and "reject_old_samples_max_age" parameters are related to if old log entries received by Loki should or shouldn't be accepted by the tool and how old these log entries can be and still be accepted.

See more information about the Loki configuration here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM