From 71a8f2d962c8bc3e189ebb06d133174966e3caa5 Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Mon, 25 Mar 2024 17:12:10 +0100 Subject: [PATCH] Document `retention.count` & `retention.interval` options --- config.example.yml | 10 ++++++++++ doc/03-Configuration.md | 2 ++ 2 files changed, 12 insertions(+) diff --git a/config.example.yml b/config.example.yml index 61d39339a..33587d521 100644 --- a/config.example.yml +++ b/config.example.yml @@ -79,6 +79,16 @@ retention: # Number of days to retain historical data for SLA reporting. By default, it is retained forever. # sla-days: + # Interval for periodically cleaning up the historical data, defined as a duration string. + # A duration string is a sequence of decimal numbers and a unit suffix, such as "20s". + # Valid units are "ms", "s", "m", "h". + # Defaults to "1h". +# interval: 1h + + # Number of old historical entries a single query can delete in a "DELETE FROM ... LIMIT count" manner. + # By default, this is limited to 5000 entries. +# count: 5000 + # Map of history category to number of days to retain its data in order to # enable retention only for specific categories or to # override the number that has been configured in history-days. diff --git a/doc/03-Configuration.md b/doc/03-Configuration.md index 515e3aa9b..e059722b8 100644 --- a/doc/03-Configuration.md +++ b/doc/03-Configuration.md @@ -83,6 +83,8 @@ allowing to keep this information for longer with a smaller storage footprint. |--------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | history-days | **Optional.** Number of days to retain historical data for all history categories. Use `options` in order to enable retention only for specific categories or to override the retention days configured here. | | sla-days | **Optional.** Number of days to retain historical data for SLA reporting. | +| interval | **Optional.** Interval for periodically cleaning up the historical data, defined as [duration string](#duration-string). Defaults to `"1h"`. | +| count | **Optional.** Number of old historical data a single query can delete in a `"DELETE FROM ... LIMIT count"` manner. Defaults to `5000`. | | options | **Optional.** Map of history category to number of days to retain its data. Available categories are `acknowledgement`, `comment`, `downtime`, `flapping`, `notification`, `sla` and `state`. | ## Appendix