From 3b9ab3f50f9286d0aae88f57708f97121597a64b Mon Sep 17 00:00:00 2001 From: Joshua Lambert Date: Mon, 17 Dec 2018 23:48:55 +0000 Subject: Add NGINX 0.16.0 and above metrics --- db/importers/common_metrics_importer.rb | 4 +++- .../20181006004100_import_common_metrics_nginx_vts.rb | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20181006004100_import_common_metrics_nginx_vts.rb (limited to 'db') diff --git a/db/importers/common_metrics_importer.rb b/db/importers/common_metrics_importer.rb index 6302394d7a6..deadd653ae9 100644 --- a/db/importers/common_metrics_importer.rb +++ b/db/importers/common_metrics_importer.rb @@ -4,11 +4,12 @@ module Importers class PrometheusMetric < ActiveRecord::Base enum group: { # built-in groups - nginx_ingress: -1, + nginx_ingress_vts: -1, ha_proxy: -2, aws_elb: -3, nginx: -4, kubernetes: -5, + nginx_ingress: -6, # custom groups business: 0, @@ -22,6 +23,7 @@ module Importers business: _('Business metrics (Custom)'), response: _('Response metrics (Custom)'), system: _('System metrics (Custom)'), + nginx_ingress_vts: _('Response metrics (NGINX Ingress VTS)'), nginx_ingress: _('Response metrics (NGINX Ingress)'), ha_proxy: _('Response metrics (HA Proxy)'), aws_elb: _('Response metrics (AWS ELB)'), diff --git a/db/migrate/20181006004100_import_common_metrics_nginx_vts.rb b/db/migrate/20181006004100_import_common_metrics_nginx_vts.rb new file mode 100644 index 00000000000..98fafed7912 --- /dev/null +++ b/db/migrate/20181006004100_import_common_metrics_nginx_vts.rb @@ -0,0 +1,15 @@ +class ImportCommonMetricsNginxVts < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + require Rails.root.join('db/importers/common_metrics_importer.rb') + + DOWNTIME = false + + def up + Importers::CommonMetricsImporter.new.execute + end + + def down + # no-op + end +end -- cgit v1.2.3