summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorJoshua Lambert <joshua@gitlab.com>2018-12-17 23:48:55 +0000
committerMike Greiling <mike@pixelcog.com>2018-12-17 23:48:55 +0000
commit3b9ab3f50f9286d0aae88f57708f97121597a64b (patch)
tree5386def2747e3fa93ddf03f81dffadcf39a45af9 /db
parent735d24f368ccaa28667e480b3e20a4d555a62955 (diff)
downloadgitlab-ce-3b9ab3f50f9286d0aae88f57708f97121597a64b.tar.gz
Add NGINX 0.16.0 and above metrics
Diffstat (limited to 'db')
-rw-r--r--db/importers/common_metrics_importer.rb4
-rw-r--r--db/migrate/20181006004100_import_common_metrics_nginx_vts.rb15
2 files changed, 18 insertions, 1 deletions
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