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
ef9f23b7
Commit
ef9f23b7
authored
May 23, 2017
by
Pawel Chojnacki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mark migration as requiring no downtime
+ Add spaces for four phases approach + fix InfluxDB rename
parent
254830c1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
1 deletion
+9
-1
app/views/admin/application_settings/_form.html.haml
app/views/admin/application_settings/_form.html.haml
+1
-1
config.ru
config.ru
+1
-0
db/migrate/20170519102115_add_prometheus_settings_to_metrics_settings.rb
...0519102115_add_prometheus_settings_to_metrics_settings.rb
+2
-0
spec/controllers/metrics_controller_spec.rb
spec/controllers/metrics_controller_spec.rb
+5
-0
No files found.
app/views/admin/application_settings/_form.html.haml
View file @
ef9f23b7
...
...
@@ -234,7 +234,7 @@
%fieldset
%legend
Metrics - Influx
%p
Setup Influx to measure a wide variety of statistics like the time spent
Setup Influx
DB
to measure a wide variety of statistics like the time spent
in running SQL queries. These settings require a
=
link_to
'restart'
,
help_page_path
(
'administration/restart_gitlab'
)
to take effect.
...
...
config.ru
View file @
ef9f23b7
...
...
@@ -14,6 +14,7 @@ if defined?(Unicorn)
use
Unicorn
::
WorkerKiller
::
Oom
,
min
,
max
end
end
# set default directory for multiproces metrics gathering
ENV
[
'prometheus_multiproc_dir'
]
||=
'tmp/prometheus_data_dir'
...
...
db/migrate/20170519102115_add_prometheus_settings_to_metrics_settings.rb
View file @
ef9f23b7
...
...
@@ -2,6 +2,8 @@ class AddPrometheusSettingsToMetricsSettings < ActiveRecord::Migration
include
Gitlab
::
Database
::
MigrationHelpers
disable_ddl_transaction!
DOWNTIME
=
false
def
up
add_column_with_default
(
:application_settings
,
:prometheus_metrics_enabled
,
:boolean
,
default:
false
,
allow_null:
false
)
...
...
spec/controllers/metrics_controller_spec.rb
View file @
ef9f23b7
...
...
@@ -27,6 +27,7 @@ describe MetricsController do
it
'returns DB ping metrics'
do
get
:metrics
expect
(
response
.
body
).
to
match
(
/^db_ping_timeout 0$/
)
expect
(
response
.
body
).
to
match
(
/^db_ping_success 1$/
)
expect
(
response
.
body
).
to
match
(
/^db_ping_latency [0-9\.]+$/
)
...
...
@@ -34,6 +35,7 @@ describe MetricsController do
it
'returns Redis ping metrics'
do
get
:metrics
expect
(
response
.
body
).
to
match
(
/^redis_ping_timeout 0$/
)
expect
(
response
.
body
).
to
match
(
/^redis_ping_success 1$/
)
expect
(
response
.
body
).
to
match
(
/^redis_ping_latency [0-9\.]+$/
)
...
...
@@ -41,6 +43,7 @@ describe MetricsController do
it
'returns file system check metrics'
do
get
:metrics
expect
(
response
.
body
).
to
match
(
/^filesystem_access_latency{shard="default"} [0-9\.]+$/
)
expect
(
response
.
body
).
to
match
(
/^filesystem_accessible{shard="default"} 1$/
)
expect
(
response
.
body
).
to
match
(
/^filesystem_write_latency{shard="default"} [0-9\.]+$/
)
...
...
@@ -56,6 +59,7 @@ describe MetricsController do
it
'returns proper response'
do
get
:metrics
expect
(
response
.
status
).
to
eq
(
404
)
end
end
...
...
@@ -64,6 +68,7 @@ describe MetricsController do
context
'without authorization token'
do
it
'returns proper response'
do
get
:metrics
expect
(
response
.
status
).
to
eq
(
404
)
end
end
...
...
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