diff --git a/cmd/promtool/main.go b/cmd/promtool/main.go index 5c85de54f..698594820 100644 --- a/cmd/promtool/main.go +++ b/cmd/promtool/main.go @@ -57,9 +57,8 @@ import ( ) const ( - successExitCode = 0 - failureExitCode = 1 - configErrExitCode = 2 + successExitCode = 0 + failureExitCode = 1 // Exit code 3 is used for "one or more lint issues detected". lintErrExitCode = 3 ) diff --git a/cmd/promtool/sd.go b/cmd/promtool/sd.go index 90ed4a56c..ce2bb3de5 100644 --- a/cmd/promtool/sd.go +++ b/cmd/promtool/sd.go @@ -43,7 +43,7 @@ func CheckSD(sdConfigFiles, sdJobName string, sdTimeout time.Duration) int { cfg, err := config.LoadFile(sdConfigFiles, false, false, logger) if err != nil { fmt.Fprintln(os.Stderr, "Cannot load config", err) - return configErrExitCode + return failureExitCode } var scrapeConfig *config.ScrapeConfig