golang-github-prometheus-pr.../0002-Default-settings.patch

31 lines
1.5 KiB
Diff
Raw Normal View History

Index: prometheus-2.0.0~rc1/cmd/prometheus/main.go
===================================================================
--- prometheus-2.0.0~rc1.orig/cmd/prometheus/main.go
+++ prometheus-2.0.0~rc1/cmd/prometheus/main.go
@@ -105,7 +105,7 @@ func main() {
a.HelpFlag.Short('h')
a.Flag("config.file", "Prometheus configuration file path.").
- Default("prometheus.yml").StringVar(&cfg.configFile)
+ Default("/etc/prometheus/prometheus.yml").StringVar(&cfg.configFile)
a.Flag("web.listen-address", "Address to listen on for UI, API, and telemetry.").
Default("0.0.0.0:9090").StringVar(&cfg.web.ListenAddress)
@@ -135,13 +135,13 @@ func main() {
Default("false").BoolVar(&cfg.web.EnableAdminAPI)
a.Flag("web.console.templates", "Path to the console template directory, available at /consoles.").
- Default("consoles").StringVar(&cfg.web.ConsoleTemplatesPath)
+ Default("/etc/prometheus/consoles").StringVar(&cfg.web.ConsoleTemplatesPath)
a.Flag("web.console.libraries", "Path to the console library directory.").
- Default("console_libraries").StringVar(&cfg.web.ConsoleLibrariesPath)
+ Default("/etc/prometheus/console_libraries").StringVar(&cfg.web.ConsoleLibrariesPath)
a.Flag("storage.tsdb.path", "Base path for metrics storage.").
- Default("data/").StringVar(&cfg.localStoragePath)
+ Default("/var/lib/prometheus/metrics/").StringVar(&cfg.localStoragePath)
a.Flag("storage.tsdb.min-block-duration", "Minimum duration of a data block before being persisted.").
Default("2h").SetValue(&cfg.tsdb.MinBlockDuration)