From 5c41ca84e5056d3cab46911c13f3e91128a612a9 Mon Sep 17 00:00:00 2001 From: beorn7 Date: Tue, 1 Nov 2016 15:17:59 +0100 Subject: [PATCH] Catch negative staleness delta set on the command line --- cmd/prometheus/config.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/prometheus/config.go b/cmd/prometheus/config.go index 9e0f2eca1..879210827 100644 --- a/cmd/prometheus/config.go +++ b/cmd/prometheus/config.go @@ -262,6 +262,10 @@ func parse(args []string) error { return err } + if promql.StalenessDelta < 0 { + return fmt.Errorf("negative staleness delta: %s", promql.StalenessDelta) + } + if err := parsePrometheusURL(); err != nil { return err }