mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
app/vmagent: print brief usage info for vmagent -help
This commit is contained in:
parent
4fd3f6f991
commit
05ae1472e3
1 changed files with 13 additions and 0 deletions
|
@ -54,6 +54,7 @@ var (
|
||||||
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()
|
||||||
|
@ -205,3 +206,15 @@ var (
|
||||||
|
|
||||||
promscrapeConfigReloadRequests = metrics.NewCounter(`vmagent_http_requests_total{path="/-/reload"}`)
|
promscrapeConfigReloadRequests = metrics.NewCounter(`vmagent_http_requests_total{path="/-/reload"}`)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func usage() {
|
||||||
|
const s = `
|
||||||
|
vmagent collects metrics data via popular data ingestion protocols and routes it to VictoriaMetrics.
|
||||||
|
|
||||||
|
See the docs at https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/app/vmagent/README.md .
|
||||||
|
`
|
||||||
|
|
||||||
|
f := flag.CommandLine.Output()
|
||||||
|
fmt.Fprintf(f, "%s\n", s)
|
||||||
|
flag.PrintDefaults()
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue