mirror of
https://github.com/mattermost/focalboard.git
synced 2024-11-24 08:22:29 +02:00
Fix configuration for prometheus address (#2763)
The env variable for prometheus address is not respected as it should be set as viper default config. Ticket: https://mattermost.atlassian.net/browse/43295
This commit is contained in:
parent
af35a8e2c2
commit
539aee6a46
@ -10,7 +10,7 @@
|
||||
"filesdriver": "local",
|
||||
"filespath": "./files",
|
||||
"telemetry": true,
|
||||
"prometheus_address": ":9092",
|
||||
"prometheusaddress": ":9092",
|
||||
"webhook_update": [],
|
||||
"session_expire_time": 2592000,
|
||||
"session_refresh_time": 18000,
|
||||
|
@ -8,7 +8,7 @@
|
||||
"webpath": "./pack",
|
||||
"filespath": "./files",
|
||||
"telemetry": true,
|
||||
"prometheus_address": ":9092",
|
||||
"prometheusaddress": ":9092",
|
||||
"session_expire_time": 2592000,
|
||||
"session_refresh_time": 18000,
|
||||
"localOnly": false,
|
||||
|
@ -8,7 +8,7 @@
|
||||
"webpath": "./pack",
|
||||
"filespath": "./files",
|
||||
"telemetry": true,
|
||||
"prometheus_address": ":9092",
|
||||
"prometheusaddress": ":9092",
|
||||
"session_expire_time": 2592000,
|
||||
"session_refresh_time": 18000,
|
||||
"localOnly": false,
|
||||
|
@ -40,7 +40,7 @@ type Configuration struct {
|
||||
MaxFileSize int64 `json:"maxfilesize" mapstructure:"mafilesize"`
|
||||
Telemetry bool `json:"telemetry" mapstructure:"telemetry"`
|
||||
TelemetryID string `json:"telemetryid" mapstructure:"telemetryid"`
|
||||
PrometheusAddress string `json:"prometheus_address" mapstructure:"prometheus_address"`
|
||||
PrometheusAddress string `json:"prometheusaddress" mapstructure:"prometheusaddress"`
|
||||
WebhookUpdate []string `json:"webhook_update" mapstructure:"webhook_update"`
|
||||
Secret string `json:"secret" mapstructure:"secret"`
|
||||
SessionExpireTime int64 `json:"session_expire_time" mapstructure:"session_expire_time"`
|
||||
@ -95,6 +95,7 @@ func ReadConfigFile(configFilePath string) (*Configuration, error) {
|
||||
viper.SetDefault("AuthMode", "native")
|
||||
viper.SetDefault("NotifyFreqCardSeconds", 120) // 2 minutes after last card edit
|
||||
viper.SetDefault("NotifyFreqBoardSeconds", 86400) // 1 day after last card edit
|
||||
viper.SetDefault("PrometheusAddress", "")
|
||||
|
||||
err := viper.ReadInConfig() // Find and read the config file
|
||||
if err != nil { // Handle errors reading the config file
|
||||
|
Loading…
Reference in New Issue
Block a user