mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 13:44:05 -08:00
update exit code for sd
Signed-off-by: jessicagreben <jessicagrebens@gmail.com>
This commit is contained in:
parent
99bb56fc46
commit
59f7ef06d0
|
@ -74,7 +74,7 @@ func CheckSD(sdConfigFiles, sdJobName string, sdTimeout time.Duration) int {
|
||||||
d, err := cfg.NewDiscoverer(discovery.DiscovererOptions{Logger: logger})
|
d, err := cfg.NewDiscoverer(discovery.DiscovererOptions{Logger: logger})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintln(os.Stderr, "Could not create new discoverer", err)
|
fmt.Fprintln(os.Stderr, "Could not create new discoverer", err)
|
||||||
return configErrExitCode
|
return failureExitCode
|
||||||
}
|
}
|
||||||
go d.Run(ctx, targetGroupChan)
|
go d.Run(ctx, targetGroupChan)
|
||||||
}
|
}
|
||||||
|
@ -100,7 +100,7 @@ outerLoop:
|
||||||
res, err := json.MarshalIndent(results, "", " ")
|
res, err := json.MarshalIndent(results, "", " ")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintf(os.Stderr, "Could not marshal result json: %s", err)
|
fmt.Fprintf(os.Stderr, "Could not marshal result json: %s", err)
|
||||||
return configErrExitCode
|
return failureExitCode
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Printf("%s", res)
|
fmt.Printf("%s", res)
|
||||||
|
|
Loading…
Reference in a new issue