summaryrefslogtreecommitdiffstats
path: root/model/config.go
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2016-11-22 11:05:54 -0800
committerHarrison Healey <harrisonmhealey@gmail.com>2016-11-22 14:05:54 -0500
commit7961599b2e41c71720a42b3bfde641f7529f05fe (patch)
tree3c039e1d3790a954ba65fe551c7b348331bce994 /model/config.go
parente033dcce8e57ed6b6684227adf9b29347e4718b3 (diff)
downloadchat-7961599b2e41c71720a42b3bfde641f7529f05fe.tar.gz
chat-7961599b2e41c71720a42b3bfde641f7529f05fe.tar.bz2
chat-7961599b2e41c71720a42b3bfde641f7529f05fe.zip
PLT-4357 adding performance monitoring (#4622)
* WIP * WIP * Adding metrics collection * updating vendor packages * Adding metrics to config * Adding admin console page for perf monitoring * Updating glide * switching to tylerb/graceful
Diffstat (limited to 'model/config.go')
-rw-r--r--model/config.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/model/config.go b/model/config.go
index f2ff788d8..40c76efe5 100644
--- a/model/config.go
+++ b/model/config.go
@@ -98,6 +98,11 @@ type ClusterSettings struct {
InterNodeUrls []string
}
+type MetricsSettings struct {
+ Enable *bool
+ ListenAddress *string
+}
+
type SSOSettings struct {
Enable bool
Secret string
@@ -330,6 +335,7 @@ type Config struct {
SamlSettings SamlSettings
NativeAppSettings NativeAppSettings
ClusterSettings ClusterSettings
+ MetricsSettings MetricsSettings
WebrtcSettings WebrtcSettings
}
@@ -772,6 +778,16 @@ func (o *Config) SetDefaults() {
o.ClusterSettings.InterNodeUrls = []string{}
}
+ if o.MetricsSettings.ListenAddress == nil {
+ o.MetricsSettings.ListenAddress = new(string)
+ *o.MetricsSettings.ListenAddress = ":8067"
+ }
+
+ if o.MetricsSettings.Enable == nil {
+ o.MetricsSettings.Enable = new(bool)
+ *o.MetricsSettings.Enable = false
+ }
+
if o.ComplianceSettings.Enable == nil {
o.ComplianceSettings.Enable = new(bool)
*o.ComplianceSettings.Enable = false