Commit 3cef5835 authored by Kamil Trzciński's avatar Kamil Trzciński

Fix conflicts

parent 0f541b2d
# frozen_string_literal: true # frozen_string_literal: true
class PrometheusMetric < ActiveRecord::Base class PrometheusMetric < ActiveRecord::Base
<<<<<<< HEAD
prepend EE::PrometheusMetric prepend EE::PrometheusMetric
=======
>>>>>>> upstream/master
belongs_to :project, validate: true, inverse_of: :prometheus_metrics belongs_to :project, validate: true, inverse_of: :prometheus_metrics
enum group: { enum group: {
......
...@@ -14,11 +14,8 @@ class CommitStatusPresenter < Gitlab::View::Presenter::Delegated ...@@ -14,11 +14,8 @@ class CommitStatusPresenter < Gitlab::View::Presenter::Delegated
presents :build presents :build
<<<<<<< HEAD
prepend ::EE::CommitStatusPresenter prepend ::EE::CommitStatusPresenter
=======
>>>>>>> upstream/master
def self.callout_failure_messages def self.callout_failure_messages
CALLOUT_FAILURE_MESSAGES CALLOUT_FAILURE_MESSAGES
end end
......
...@@ -187,19 +187,6 @@ ...@@ -187,19 +187,6 @@
- container_memory_usage_bytes - container_memory_usage_bytes
weight: 2 weight: 2
queries: queries:
<<<<<<< HEAD:config/prometheus/common_metrics.yml
=======
- id: system_metrics_kubernetes_container_memory_average
query_range: 'avg(sum(container_memory_usage_bytes{container_name!="POD",pod_name=~"^%{ci_environment_slug}-(.*)",namespace="%{kube_namespace}"}) by (job)) without (job) / count(avg(container_memory_usage_bytes{container_name!="POD",pod_name=~"^%{ci_environment_slug}-(.*)",namespace="%{kube_namespace}"}) without (job)) /1024/1024'
label: Pod average
unit: MB
- title: "Canary: Memory Usage (Pod Average)"
y_label: "Memory Used per Pod"
required_metrics:
- container_memory_usage_bytes
weight: 2
queries:
>>>>>>> upstream/master:config/prometheus/common_metrics.yml
- id: system_metrics_kubernetes_container_memory_average_canary - id: system_metrics_kubernetes_container_memory_average_canary
query_range: 'avg(sum(container_memory_usage_bytes{container_name!="POD",pod_name=~"^%{ci_environment_slug}-canary-(.*)",namespace="%{kube_namespace}"}) by (job)) without (job) / count(avg(container_memory_usage_bytes{container_name!="POD",pod_name=~"^%{ci_environment_slug}-canary-(.*)",namespace="%{kube_namespace}"}) without (job)) /1024/1024' query_range: 'avg(sum(container_memory_usage_bytes{container_name!="POD",pod_name=~"^%{ci_environment_slug}-canary-(.*)",namespace="%{kube_namespace}"}) by (job)) without (job) / count(avg(container_memory_usage_bytes{container_name!="POD",pod_name=~"^%{ci_environment_slug}-canary-(.*)",namespace="%{kube_namespace}"}) without (job)) /1024/1024'
label: Pod average label: Pod average
...@@ -212,11 +199,7 @@ ...@@ -212,11 +199,7 @@
weight: 1 weight: 1
queries: queries:
- id: system_metrics_kubernetes_container_core_usage - id: system_metrics_kubernetes_container_core_usage
<<<<<<< HEAD:config/prometheus/common_metrics.yml
query_range: 'avg(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^%{ci_environment_slug}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="%{kube_namespace}"}[15m])) by (job)) without (job) / count(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^%{ci_environment_slug}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="%{kube_namespace}"}[15m])) by (pod_name))' query_range: 'avg(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^%{ci_environment_slug}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="%{kube_namespace}"}[15m])) by (job)) without (job) / count(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^%{ci_environment_slug}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="%{kube_namespace}"}[15m])) by (pod_name))'
=======
query_range: 'avg(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^%{ci_environment_slug}-(.*)",namespace="%{kube_namespace}"}[15m])) by (job)) without (job) / count(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^%{ci_environment_slug}-(.*)",namespace="%{kube_namespace}"}[15m])) by (pod_name))'
>>>>>>> upstream/master:config/prometheus/common_metrics.yml
label: Pod average label: Pod average
unit: "cores" unit: "cores"
- title: "Canary: Core Usage (Pod Average)" - title: "Canary: Core Usage (Pod Average)"
...@@ -230,7 +213,3 @@ ...@@ -230,7 +213,3 @@
label: Pod average label: Pod average
unit: "cores" unit: "cores"
track: canary track: canary
<<<<<<< HEAD:config/prometheus/common_metrics.yml
=======
>>>>>>> upstream/master:config/prometheus/common_metrics.yml
...@@ -2266,7 +2266,6 @@ ActiveRecord::Schema.define(version: 20180906101639) do ...@@ -2266,7 +2266,6 @@ ActiveRecord::Schema.define(version: 20180906101639) do
add_index "projects", ["star_count"], name: "index_projects_on_star_count", using: :btree add_index "projects", ["star_count"], name: "index_projects_on_star_count", using: :btree
add_index "projects", ["visibility_level"], name: "index_projects_on_visibility_level", using: :btree add_index "projects", ["visibility_level"], name: "index_projects_on_visibility_level", using: :btree
<<<<<<< HEAD
create_table "prometheus_alerts", force: :cascade do |t| create_table "prometheus_alerts", force: :cascade do |t|
t.datetime_with_timezone "created_at", null: false t.datetime_with_timezone "created_at", null: false
t.datetime_with_timezone "updated_at", null: false t.datetime_with_timezone "updated_at", null: false
...@@ -2281,8 +2280,6 @@ ActiveRecord::Schema.define(version: 20180906101639) do ...@@ -2281,8 +2280,6 @@ ActiveRecord::Schema.define(version: 20180906101639) do
add_index "prometheus_alerts", ["project_id", "prometheus_metric_id"], name: "index_prometheus_alerts_on_project_id_and_prometheus_metric_id", unique: true, using: :btree add_index "prometheus_alerts", ["project_id", "prometheus_metric_id"], name: "index_prometheus_alerts_on_project_id_and_prometheus_metric_id", unique: true, using: :btree
add_index "prometheus_alerts", ["prometheus_metric_id"], name: "index_prometheus_alerts_on_prometheus_metric_id", using: :btree add_index "prometheus_alerts", ["prometheus_metric_id"], name: "index_prometheus_alerts_on_prometheus_metric_id", using: :btree
=======
>>>>>>> upstream/master
create_table "prometheus_metrics", force: :cascade do |t| create_table "prometheus_metrics", force: :cascade do |t|
t.integer "project_id" t.integer "project_id"
t.string "title", null: false t.string "title", null: false
...@@ -3180,15 +3177,11 @@ ActiveRecord::Schema.define(version: 20180906101639) do ...@@ -3180,15 +3177,11 @@ ActiveRecord::Schema.define(version: 20180906101639) do
add_foreign_key "project_mirror_data", "projects", name: "fk_d1aad367d7", on_delete: :cascade add_foreign_key "project_mirror_data", "projects", name: "fk_d1aad367d7", on_delete: :cascade
add_foreign_key "project_repository_states", "projects", on_delete: :cascade add_foreign_key "project_repository_states", "projects", on_delete: :cascade
add_foreign_key "project_statistics", "projects", on_delete: :cascade add_foreign_key "project_statistics", "projects", on_delete: :cascade
<<<<<<< HEAD
add_foreign_key "prometheus_alerts", "environments", on_delete: :cascade add_foreign_key "prometheus_alerts", "environments", on_delete: :cascade
add_foreign_key "prometheus_alerts", "projects", on_delete: :cascade add_foreign_key "prometheus_alerts", "projects", on_delete: :cascade
add_foreign_key "prometheus_alerts", "prometheus_metrics", on_delete: :cascade add_foreign_key "prometheus_alerts", "prometheus_metrics", on_delete: :cascade
add_foreign_key "prometheus_metrics", "projects", on_delete: :cascade add_foreign_key "prometheus_metrics", "projects", on_delete: :cascade
add_foreign_key "protected_branch_merge_access_levels", "namespaces", column: "group_id", name: "fk_98f3d044fe", on_delete: :cascade add_foreign_key "protected_branch_merge_access_levels", "namespaces", column: "group_id", name: "fk_98f3d044fe", on_delete: :cascade
=======
add_foreign_key "prometheus_metrics", "projects", on_delete: :cascade
>>>>>>> upstream/master
add_foreign_key "protected_branch_merge_access_levels", "protected_branches", name: "fk_8a3072ccb3", on_delete: :cascade add_foreign_key "protected_branch_merge_access_levels", "protected_branches", name: "fk_8a3072ccb3", on_delete: :cascade
add_foreign_key "protected_branch_merge_access_levels", "users" add_foreign_key "protected_branch_merge_access_levels", "users"
add_foreign_key "protected_branch_push_access_levels", "namespaces", column: "group_id", name: "fk_7111b68cdb", on_delete: :cascade add_foreign_key "protected_branch_push_access_levels", "namespaces", column: "group_id", name: "fk_7111b68cdb", on_delete: :cascade
......
...@@ -6,12 +6,7 @@ We strive to support the 2-4 most important metrics for each common system servi ...@@ -6,12 +6,7 @@ We strive to support the 2-4 most important metrics for each common system servi
### Query identifier ### Query identifier
<<<<<<< HEAD
The requirement for adding a new metrics is to make each query to have an unique identifier.
Identifier is used to update the metric later when changed.
=======
The requirement for adding a new metric is to make each query to have an unique identifier which is used to update the metric later when changed: The requirement for adding a new metric is to make each query to have an unique identifier which is used to update the metric later when changed:
>>>>>>> upstream/master
```yaml ```yaml
- group: Response metrics (NGINX Ingress) - group: Response metrics (NGINX Ingress)
......
...@@ -15,11 +15,8 @@ module Gitlab ...@@ -15,11 +15,8 @@ module Gitlab
private_constant :REASONS private_constant :REASONS
<<<<<<< HEAD
prepend ::EE::Gitlab::Ci::Status::Build::Failed prepend ::EE::Gitlab::Ci::Status::Build::Failed
=======
>>>>>>> upstream/master
def status_tooltip def status_tooltip
base_message base_message
end end
......
...@@ -355,12 +355,9 @@ priorities: ...@@ -355,12 +355,9 @@ priorities:
- label - label
prometheus_metrics: prometheus_metrics:
- project - project
<<<<<<< HEAD
- prometheus_alerts - prometheus_alerts
prometheus_alerts: prometheus_alerts:
- project - project
=======
>>>>>>> upstream/master
timelogs: timelogs:
- issue - issue
- merge_request - merge_request
......
...@@ -596,15 +596,12 @@ PrometheusMetric: ...@@ -596,15 +596,12 @@ PrometheusMetric:
- group - group
- common - common
- identifier - identifier
<<<<<<< HEAD
PrometheusAlert: PrometheusAlert:
- threshold - threshold
- operator - operator
- environment_id - environment_id
- project_id - project_id
- prometheus_metric_id - prometheus_metric_id
=======
>>>>>>> upstream/master
Badge: Badge:
- id - id
- link_url - link_url
......
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