Commit ef9f23b7 authored by Pawel Chojnacki's avatar Pawel Chojnacki

Mark migration as requiring no downtime

+ Add spaces for four phases approach
+ fix InfluxDB rename
parent 254830c1
......@@ -234,7 +234,7 @@
%fieldset
%legend Metrics - Influx
%p
Setup Influx to measure a wide variety of statistics like the time spent
Setup InfluxDB 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.
......
......@@ -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'
......
......@@ -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)
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment