From a8fe9e2ca7c5a3ff8500cb9d01c8d02ca2ebf30b Mon Sep 17 00:00:00 2001 From: Yahav Halfon Date: Mon, 9 Sep 2024 01:22:36 +0300 Subject: [PATCH] Added storage.agent.wal-truncate-frequency to docs Signed-off-by: Yahav Halfon --- cmd/prometheus/main.go | 2 +- docs/command-line/prometheus.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/prometheus/main.go b/cmd/prometheus/main.go index ee6cd0c2e..565b7f314 100644 --- a/cmd/prometheus/main.go +++ b/cmd/prometheus/main.go @@ -435,7 +435,7 @@ func main() { agentOnlyFlag(a, "storage.agent.wal-truncate-frequency", "The frequency at which to truncate the WAL and remove old data."). - Hidden().PlaceHolder("").SetValue(&cfg.agent.TruncateFrequency) + Default("2h").PlaceHolder("").SetValue(&cfg.agent.TruncateFrequency) agentOnlyFlag(a, "storage.agent.retention.min-time", "Minimum age samples may be before being considered for deletion when the WAL is truncated"). diff --git a/docs/command-line/prometheus.md b/docs/command-line/prometheus.md index 8fefa8ecc..d99511fdf 100644 --- a/docs/command-line/prometheus.md +++ b/docs/command-line/prometheus.md @@ -40,6 +40,7 @@ The Prometheus monitoring server | --storage.tsdb.head-chunks-write-queue-size | Size of the queue through which head chunks are written to the disk to be m-mapped, 0 disables the queue completely. Experimental. Use with server mode only. | `0` | | --storage.agent.path | Base path for metrics storage. Use with agent mode only. | `data-agent/` | | --storage.agent.wal-compression | Compress the agent WAL. Use with agent mode only. | `true` | +| --storage.agent.wal-truncate-frequency | The frequency at which to truncate the WAL and remove old data. Use with agent mode only. | `2h` | | --storage.agent.retention.min-time | Minimum age samples may be before being considered for deletion when the WAL is truncated Use with agent mode only. | | | --storage.agent.retention.max-time | Maximum age samples may be before being forcibly deleted when the WAL is truncated Use with agent mode only. | | | --storage.agent.no-lockfile | Do not create lockfile in data directory. Use with agent mode only. | `false` |