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

39 lines
1.3 KiB
Diff

Index: prometheus-1.5.2/cmd/prometheus/config.go
===================================================================
--- prometheus-1.5.2.orig/cmd/prometheus/config.go
+++ prometheus-1.5.2/cmd/prometheus/config.go
@@ -73,7 +73,8 @@ func init() {
"Print version information.",
)
cfg.fs.StringVar(
- &cfg.configFile, "config.file", "prometheus.yml",
+ &cfg.configFile, "config.file",
+ "/etc/prometheus/prometheus.yml",
"Prometheus configuration file name.",
)
@@ -111,17 +112,20 @@ func init() {
"Enable remote service shutdown.",
)
cfg.fs.StringVar(
- &cfg.web.ConsoleTemplatesPath, "web.console.templates", "consoles",
+ &cfg.web.ConsoleTemplatesPath, "web.console.templates",
+ "/etc/prometheus/consoles",
"Path to the console template directory, available at /consoles.",
)
cfg.fs.StringVar(
- &cfg.web.ConsoleLibrariesPath, "web.console.libraries", "console_libraries",
+ &cfg.web.ConsoleLibrariesPath, "web.console.libraries",
+ "/etc/prometheus/console_libraries",
"Path to the console library directory.",
)
// Storage.
cfg.fs.StringVar(
- &cfg.storage.PersistenceStoragePath, "storage.local.path", "data",
+ &cfg.storage.PersistenceStoragePath, "storage.local.path",
+ "/var/lib/prometheus/metrics",
"Base path for metrics storage.",
)
cfg.fs.IntVar(