diff --git a/config.json b/config.json index 0bc8461ae..d33e82c26 100644 --- a/config.json +++ b/config.json @@ -1,8 +1,8 @@ { "serverRoot": "http://localhost:8000", - "port": 8000, - "dbtype": "sqlite3", - "dbconfig": "./focalboard.db?_busy_timeout=5000", + "port": 8000, + "dbtype": "sqlite3", + "dbconfig": "./focalboard.db?_busy_timeout=5000", "dbtableprefix": "", "postgres_dbconfig": "dbname=focalboard sslmode=disable", "useSSL": false, @@ -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, diff --git a/docker/config.json b/docker/config.json index 58dfb0d35..d661a9a50 100644 --- a/docker/config.json +++ b/docker/config.json @@ -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, diff --git a/server-config.json b/server-config.json index d1879d687..84490a2cc 100644 --- a/server-config.json +++ b/server-config.json @@ -1,14 +1,14 @@ { - "serverRoot": "http://localhost:8000", - "port": 8000, - "dbtype": "sqlite3", + "serverRoot": "http://localhost:8000", + "port": 8000, + "dbtype": "sqlite3", "dbconfig": "./focalboard.db", - "postgres_dbconfig": "dbname=focalboard sslmode=disable", - "useSSL": false, - "webpath": "./pack", - "filespath": "./files", + "postgres_dbconfig": "dbname=focalboard sslmode=disable", + "useSSL": false, + "webpath": "./pack", + "filespath": "./files", "telemetry": true, - "prometheus_address": ":9092", + "prometheusaddress": ":9092", "session_expire_time": 2592000, "session_refresh_time": 18000, "localOnly": false, diff --git a/server/services/config/config.go b/server/services/config/config.go index 40e1070f7..43b41c74f 100644 --- a/server/services/config/config.go +++ b/server/services/config/config.go @@ -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