mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-05 22:32:20 +01:00
app/vmalert: print brief usage info for vmalert -help
This commit is contained in:
parent
3848ea3a4a
commit
58069f5a6a
@ -62,6 +62,7 @@ absolute path to all .yaml files in root.`)
|
|||||||
func main() {
|
func main() {
|
||||||
// Write flags and help message to stdout, since it is easier to grep or pipe.
|
// Write flags and help message to stdout, since it is easier to grep or pipe.
|
||||||
flag.CommandLine.SetOutput(os.Stdout)
|
flag.CommandLine.SetOutput(os.Stdout)
|
||||||
|
flag.Usage = usage
|
||||||
envflag.Parse()
|
envflag.Parse()
|
||||||
buildinfo.Init()
|
buildinfo.Init()
|
||||||
logger.Init()
|
logger.Init()
|
||||||
@ -172,3 +173,15 @@ func checkFlags() {
|
|||||||
logger.Fatalf("datasource.url is empty")
|
logger.Fatalf("datasource.url is empty")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func usage() {
|
||||||
|
const s = `
|
||||||
|
vmalert processes alerts and recording rules.
|
||||||
|
|
||||||
|
See the docs at https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/app/vmalert/README.md .
|
||||||
|
`
|
||||||
|
|
||||||
|
f := flag.CommandLine.Output()
|
||||||
|
fmt.Fprintf(f, "%s\n", s)
|
||||||
|
flag.PrintDefaults()
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user