forked from pool/golang-github-prometheus-prometheus
Added systemd unit and default config on top of moio's package OBS-URL: https://build.opensuse.org/request/show/493648 OBS-URL: https://build.opensuse.org/package/show/server:monitoring/golang-github-prometheus-prometheus?expand=0&rev=1
39 lines
1.3 KiB
Diff
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(
|