Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
1eca4881
Commit
1eca4881
authored
Jul 05, 2017
by
Pawel Chojnacki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge prometheus unicorn sampler settigns within monitoring settings
parent
6d60e265
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
11 deletions
+4
-11
config/gitlab.yml.example
config/gitlab.yml.example
+2
-4
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+1
-6
config/initializers/8_metrics.rb
config/initializers/8_metrics.rb
+1
-1
No files found.
config/gitlab.yml.example
View file @
1eca4881
...
@@ -543,14 +543,12 @@ production: &base
...
@@ -543,14 +543,12 @@ production: &base
# enabled: true
# enabled: true
# host: localhost
# host: localhost
# port: 3808
# port: 3808
prometheus:
# Time between sampling of unicorn socket metrics, in seconds
# unicorn_sampler_interval: 10
## Monitoring
## Monitoring
# Built in monitoring settings
# Built in monitoring settings
monitoring:
monitoring:
# Time between sampling of unicorn socket metrics, in seconds
# unicorn_sampler_interval: 10
# IP whitelist to access monitoring endpoints
# IP whitelist to access monitoring endpoints
ip_whitelist:
ip_whitelist:
- 127.0.0.0/8
- 127.0.0.0/8
...
...
config/initializers/1_settings.rb
View file @
1eca4881
...
@@ -499,12 +499,7 @@ Settings.webpack.dev_server['port'] ||= 3808
...
@@ -499,12 +499,7 @@ Settings.webpack.dev_server['port'] ||= 3808
#
#
Settings
[
'monitoring'
]
||=
Settingslogic
.
new
({})
Settings
[
'monitoring'
]
||=
Settingslogic
.
new
({})
Settings
.
monitoring
[
'ip_whitelist'
]
||=
[
'127.0.0.1/8'
]
Settings
.
monitoring
[
'ip_whitelist'
]
||=
[
'127.0.0.1/8'
]
Settings
.
monitoring
[
'unicorn_sampler_interval'
]
||=
10
#
# Prometheus metrics settings
#
Settings
[
'prometheus'
]
||=
Settingslogic
.
new
({})
Settings
.
prometheus
[
'unicorn_sampler_interval'
]
||=
10
#
#
# Testing settings
# Testing settings
...
...
config/initializers/8_metrics.rb
View file @
1eca4881
...
@@ -119,7 +119,7 @@ def instrument_classes(instrumentation)
...
@@ -119,7 +119,7 @@ def instrument_classes(instrumentation)
end
end
# rubocop:enable Metrics/AbcSize
# rubocop:enable Metrics/AbcSize
Gitlab
::
Metrics
::
UnicornSampler
.
initialize_instance
(
Settings
.
prometheus
.
unicorn_sampler_interval
).
start
Gitlab
::
Metrics
::
UnicornSampler
.
initialize_instance
(
Settings
.
monitoring
.
unicorn_sampler_interval
).
start
Gitlab
::
Application
.
configure
do
|
config
|
Gitlab
::
Application
.
configure
do
|
config
|
# 0 should be Sentry to catch errors in this middleware
# 0 should be Sentry to catch errors in this middleware
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment