Add Prometheus metrics configuration
+ Cleanup Gemfile
This commit is contained in:
parent
c28546177e
commit
cf932df234
3 changed files with 34 additions and 2 deletions
4
Gemfile
4
Gemfile
|
@ -268,6 +268,10 @@ group :metrics do
|
|||
gem 'allocations', '~> 1.0', require: false, platform: :mri
|
||||
gem 'method_source', '~> 0.8', require: false
|
||||
gem 'influxdb', '~> 0.2', require: false
|
||||
|
||||
# Prometheus
|
||||
gem 'mmap2', '~> 2.2.6'
|
||||
gem 'prometheus-client-mmap'
|
||||
end
|
||||
|
||||
group :development do
|
||||
|
|
|
@ -232,9 +232,9 @@
|
|||
= f.number_field :container_registry_token_expire_delay, class: 'form-control'
|
||||
|
||||
%fieldset
|
||||
%legend Metrics
|
||||
%legend Metrics - Influx
|
||||
%p
|
||||
Setup InfluxDB to measure a wide variety of statistics like the time spent
|
||||
Setup Influx 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.
|
||||
|
@ -296,6 +296,21 @@
|
|||
The amount of points to store in a single UDP packet. More points
|
||||
results in fewer but larger UDP packets being sent.
|
||||
|
||||
%fieldset
|
||||
%legend Metrics - Prometheus
|
||||
%p
|
||||
Setup Prometheus to measure a variety of statistics that partially overlap and complement Influx based metrics.
|
||||
This setting requires a
|
||||
= link_to 'restart', help_page_path('administration/restart_gitlab')
|
||||
to take effect.
|
||||
= link_to icon('question-circle'), help_page_path('administration/monitoring/performance/introduction')
|
||||
.form-group
|
||||
.col-sm-offset-2.col-sm-10
|
||||
.checkbox
|
||||
= f.label :prometheus_metrics_enabled do
|
||||
= f.check_box :prometheus_metrics_enabled
|
||||
Enable Prometheus Metrics
|
||||
|
||||
%fieldset
|
||||
%legend Background Jobs
|
||||
%p
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
class AddPrometheusSettingsToMetricsSettings < ActiveRecord::Migration
|
||||
include Gitlab::Database::MigrationHelpers
|
||||
disable_ddl_transaction!
|
||||
|
||||
def up
|
||||
add_column_with_default(:application_settings, :prometheus_metrics_enabled, :boolean,
|
||||
default: false, allow_null: false)
|
||||
end
|
||||
|
||||
def down
|
||||
remove_column(:application_settings, :prometheus_metrics_enabled)
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue