Amtool and Alertmanager binaries print to stdout
Signed-off-by: ArthurSens <arthursens2005@gmail.com>
This commit is contained in:
parent
7866b9bb09
commit
74d388e3f4
|
@ -89,7 +89,7 @@ func NewAlertmanagerClient(amURL *url.URL) *client.Alertmanager {
|
||||||
// Execute is the main function for the amtool command
|
// Execute is the main function for the amtool command
|
||||||
func Execute() {
|
func Execute() {
|
||||||
var (
|
var (
|
||||||
app = kingpin.New("amtool", helpRoot)
|
app = kingpin.New("amtool", helpRoot).UsageWriter(os.Stdout)
|
||||||
)
|
)
|
||||||
|
|
||||||
format.InitFormatFlags(app)
|
format.InitFormatFlags(app)
|
||||||
|
|
|
@ -210,6 +210,7 @@ func run() int {
|
||||||
)
|
)
|
||||||
|
|
||||||
promlogflag.AddFlags(kingpin.CommandLine, &promlogConfig)
|
promlogflag.AddFlags(kingpin.CommandLine, &promlogConfig)
|
||||||
|
kingpin.CommandLine.UsageWriter(os.Stdout)
|
||||||
|
|
||||||
kingpin.Version(version.Print("alertmanager"))
|
kingpin.Version(version.Print("alertmanager"))
|
||||||
kingpin.CommandLine.GetFlag("help").Short('h')
|
kingpin.CommandLine.GetFlag("help").Short('h')
|
||||||
|
|
Loading…
Reference in New Issue