From ecc24b554ddfb6134b6a4267fd36dc3ef037ef44 Mon Sep 17 00:00:00 2001 From: Brian Brazil Date: Sun, 24 Dec 2017 12:13:48 +0000 Subject: [PATCH] Hide block duration flags. (#3618) Users are starting to use these mistakenly thinking they'll help with issues, and thus causing some confusion. Thus hide them and make it clear that they're only there for testing reasons. --- cmd/prometheus/main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/prometheus/main.go b/cmd/prometheus/main.go index ad580e9979..e53f6e0af5 100644 --- a/cmd/prometheus/main.go +++ b/cmd/prometheus/main.go @@ -148,12 +148,12 @@ func main() { a.Flag("storage.tsdb.path", "Base path for metrics storage."). Default("data/").StringVar(&cfg.localStoragePath) - a.Flag("storage.tsdb.min-block-duration", "Minimum duration of a data block before being persisted."). - Default("2h").SetValue(&cfg.tsdb.MinBlockDuration) + a.Flag("storage.tsdb.min-block-duration", "Minimum duration of a data block before being persisted. For use in testing."). + Hidden().Default("2h").SetValue(&cfg.tsdb.MinBlockDuration) a.Flag("storage.tsdb.max-block-duration", - "Maximum duration compacted blocks may span. (Defaults to 10% of the retention period)"). - PlaceHolder("").SetValue(&cfg.tsdb.MaxBlockDuration) + "Maximum duration compacted blocks may span. For use in testing. (Defaults to 10% of the retention period)."). + Hidden().PlaceHolder("").SetValue(&cfg.tsdb.MaxBlockDuration) a.Flag("storage.tsdb.retention", "How long to retain samples in the storage."). Default("15d").SetValue(&cfg.tsdb.Retention)