diff --git a/cmd/prometheus/main.go b/cmd/prometheus/main.go index 4559d51837..ef76084217 100644 --- a/cmd/prometheus/main.go +++ b/cmd/prometheus/main.go @@ -455,7 +455,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 9b4ec8b736..4c2eabe583 100644 --- a/docs/command-line/prometheus.md +++ b/docs/command-line/prometheus.md @@ -43,6 +43,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` |