提交 cf932df2 编写于 作者: P Pawel Chojnacki

Add Prometheus metrics configuration

+ Cleanup Gemfile
上级 c2854617
......@@ -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
......
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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册