From 5e638b7f44ee5dfc81b3eea9b0c2189cc504a475 Mon Sep 17 00:00:00 2001 From: tesla59 Date: Wed, 24 Apr 2024 02:56:15 +0530 Subject: [PATCH 1/3] docs: storage.md: clarify storage.tsdb.retention.time description Signed-off-by: tesla59 --- docs/storage.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/storage.md b/docs/storage.md index b4c5b6ada..aae16a170 100644 --- a/docs/storage.md +++ b/docs/storage.md @@ -84,8 +84,10 @@ or 31 days, whichever is smaller. Prometheus has several flags that configure local storage. The most important are: - `--storage.tsdb.path`: Where Prometheus writes its database. Defaults to `data/`. -- `--storage.tsdb.retention.time`: When to remove old data. Defaults to `15d`. - Overrides `storage.tsdb.retention` if this flag is set to anything other than default. +- `--storage.tsdb.retention.time`: How long to retain samples in storage. When this flag is + set it overrides `storage.tsdb.retention`. If neither this flag nor `storage.tsdb.retention` + nor `storage.tsdb.retention.size` is set, the retention time defaults to `15d`. + Units Supported: y, w, d, h, m, s, ms. - `--storage.tsdb.retention.size`: The maximum number of bytes of storage blocks to retain. The oldest data will be removed first. Defaults to `0` or disabled. Units supported: B, KB, MB, GB, TB, PB, EB. Ex: "512MB". Based on powers-of-2, so 1KB is 1024B. Only From 801314901c91faf9945637680eadf283485f1516 Mon Sep 17 00:00:00 2001 From: Nishant Singh Date: Sat, 27 Apr 2024 13:50:41 +0530 Subject: [PATCH 2/3] Update docs/storage.md Co-authored-by: Ayoub Mrini Signed-off-by: Nishant Singh --- docs/storage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/storage.md b/docs/storage.md index aae16a170..21532119f 100644 --- a/docs/storage.md +++ b/docs/storage.md @@ -85,7 +85,7 @@ Prometheus has several flags that configure local storage. The most important ar - `--storage.tsdb.path`: Where Prometheus writes its database. Defaults to `data/`. - `--storage.tsdb.retention.time`: How long to retain samples in storage. When this flag is - set it overrides `storage.tsdb.retention`. If neither this flag nor `storage.tsdb.retention` + set, it overrides `storage.tsdb.retention`. If neither this flag nor `storage.tsdb.retention` nor `storage.tsdb.retention.size` is set, the retention time defaults to `15d`. Units Supported: y, w, d, h, m, s, ms. - `--storage.tsdb.retention.size`: The maximum number of bytes of storage blocks to retain. From c8b23980c9f5b21ada8f9b7e26ea0e2220f7e587 Mon Sep 17 00:00:00 2001 From: Nishant Singh Date: Sat, 27 Apr 2024 13:50:50 +0530 Subject: [PATCH 3/3] Update docs/storage.md Co-authored-by: Ayoub Mrini Signed-off-by: Nishant Singh --- docs/storage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/storage.md b/docs/storage.md index 21532119f..46bb7210e 100644 --- a/docs/storage.md +++ b/docs/storage.md @@ -87,7 +87,7 @@ Prometheus has several flags that configure local storage. The most important ar - `--storage.tsdb.retention.time`: How long to retain samples in storage. When this flag is set, it overrides `storage.tsdb.retention`. If neither this flag nor `storage.tsdb.retention` nor `storage.tsdb.retention.size` is set, the retention time defaults to `15d`. - Units Supported: y, w, d, h, m, s, ms. + Supported units: y, w, d, h, m, s, ms. - `--storage.tsdb.retention.size`: The maximum number of bytes of storage blocks to retain. The oldest data will be removed first. Defaults to `0` or disabled. Units supported: B, KB, MB, GB, TB, PB, EB. Ex: "512MB". Based on powers-of-2, so 1KB is 1024B. Only