mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-12 06:17:27 -08:00
cmd/prometheus: group flags properly (#5419)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
This commit is contained in:
parent
dafd1632a2
commit
e5dbac7972
|
@ -171,6 +171,9 @@ func main() {
|
||||||
a.Flag("web.page-title", "Document title of Prometheus instance.").
|
a.Flag("web.page-title", "Document title of Prometheus instance.").
|
||||||
Default("Prometheus Time Series Collection and Processing Server").StringVar(&cfg.web.PageTitle)
|
Default("Prometheus Time Series Collection and Processing Server").StringVar(&cfg.web.PageTitle)
|
||||||
|
|
||||||
|
a.Flag("web.cors.origin", `Regex for CORS origin. It is fully anchored. Eg. 'https?://(domain1|domain2)\.com'`).
|
||||||
|
Default(".*").StringVar(&cfg.corsRegexString)
|
||||||
|
|
||||||
a.Flag("storage.tsdb.path", "Base path for metrics storage.").
|
a.Flag("storage.tsdb.path", "Base path for metrics storage.").
|
||||||
Default("data/").StringVar(&cfg.localStoragePath)
|
Default("data/").StringVar(&cfg.localStoragePath)
|
||||||
|
|
||||||
|
@ -235,9 +238,6 @@ func main() {
|
||||||
a.Flag("query.max-samples", "Maximum number of samples a single query can load into memory. Note that queries will fail if they would load more samples than this into memory, so this also limits the number of samples a query can return.").
|
a.Flag("query.max-samples", "Maximum number of samples a single query can load into memory. Note that queries will fail if they would load more samples than this into memory, so this also limits the number of samples a query can return.").
|
||||||
Default("50000000").IntVar(&cfg.queryMaxSamples)
|
Default("50000000").IntVar(&cfg.queryMaxSamples)
|
||||||
|
|
||||||
a.Flag("web.cors.origin", `Regex for CORS origin. It is fully anchored. Eg. 'https?://(domain1|domain2)\.com'`).
|
|
||||||
Default(".*").StringVar(&cfg.corsRegexString)
|
|
||||||
|
|
||||||
promlogflag.AddFlags(a, &cfg.promlogConfig)
|
promlogflag.AddFlags(a, &cfg.promlogConfig)
|
||||||
|
|
||||||
_, err := a.Parse(os.Args[1:])
|
_, err := a.Parse(os.Args[1:])
|
||||||
|
|
Loading…
Reference in a new issue