mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-12 16:44:05 -08:00
replace config exit code with failure exit code
Signed-off-by: jessicagreben <jessicagrebens@gmail.com>
This commit is contained in:
parent
59f7ef06d0
commit
4b03fa3100
|
@ -57,9 +57,8 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
successExitCode = 0
|
successExitCode = 0
|
||||||
failureExitCode = 1
|
failureExitCode = 1
|
||||||
configErrExitCode = 2
|
|
||||||
// Exit code 3 is used for "one or more lint issues detected".
|
// Exit code 3 is used for "one or more lint issues detected".
|
||||||
lintErrExitCode = 3
|
lintErrExitCode = 3
|
||||||
)
|
)
|
||||||
|
|
|
@ -43,7 +43,7 @@ func CheckSD(sdConfigFiles, sdJobName string, sdTimeout time.Duration) int {
|
||||||
cfg, err := config.LoadFile(sdConfigFiles, false, false, logger)
|
cfg, err := config.LoadFile(sdConfigFiles, false, false, logger)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintln(os.Stderr, "Cannot load config", err)
|
fmt.Fprintln(os.Stderr, "Cannot load config", err)
|
||||||
return configErrExitCode
|
return failureExitCode
|
||||||
}
|
}
|
||||||
|
|
||||||
var scrapeConfig *config.ScrapeConfig
|
var scrapeConfig *config.ScrapeConfig
|
||||||
|
|
Loading…
Reference in a new issue