summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorPawel Chojnacki <pawel@chojnacki.ws>2017-07-03 17:09:34 +0200
committerPawel Chojnacki <pawel@chojnacki.ws>2017-07-05 00:46:11 +0200
commit18521584bd6cfc8de9511722696e87aef59795c5 (patch)
treefa5b83fca15ff3d6f7a70fd9b87bc31ad575a08a /config
parent5af1fcd6f329858d757bab0d67cb50af6c820160 (diff)
downloadgitlab-ce-18521584bd6cfc8de9511722696e87aef59795c5.tar.gz
Remove the need to use health check token
in favor of whitelist that will be used to control the access to monitoring resources
Diffstat (limited to 'config')
-rw-r--r--config/gitlab.yml.example6
-rw-r--r--config/initializers/1_settings.rb7
2 files changed, 13 insertions, 0 deletions
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index 4b81fd90f59..a49929a05b2 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -548,6 +548,12 @@ production: &base
# unicorn_sampler_interval: 10
+ ## Monitoring
+ # Built in monitoring settings
+ monitoring:
+ # IP whitelist to access monitoring endpoints
+ access_whitelist: 127.0.0.0/8
+
#
# 5. Extra customization
# ==========================
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index cb11d2c34f4..0c0dcd8413e 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -495,6 +495,13 @@ Settings.webpack.dev_server['host'] ||= 'localhost'
Settings.webpack.dev_server['port'] ||= 3808
#
+# Monitoring settings
+#
+Settings['monitoring'] ||= Settingslogic.new({})
+Settings.monitoring['ip_whitelist'] ||= %w{127.0.0.1/8}
+Settings.monitoring.ip_whitelist.map!(&IPAddr.method(:new))
+
+#
# Prometheus metrics settings
#
Settings['prometheus'] ||= Settingslogic.new({})