Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
3cef5835
Commit
3cef5835
authored
Sep 07, 2018
by
Kamil Trzciński
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix conflicts
parent
0f541b2d
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
0 additions
and
48 deletions
+0
-48
app/models/prometheus_metric.rb
app/models/prometheus_metric.rb
+0
-3
app/presenters/commit_status_presenter.rb
app/presenters/commit_status_presenter.rb
+0
-3
config/prometheus/common_metrics.yml
config/prometheus/common_metrics.yml
+0
-21
db/schema.rb
db/schema.rb
+0
-7
doc/development/prometheus_metrics.md
doc/development/prometheus_metrics.md
+0
-5
lib/gitlab/ci/status/build/failed.rb
lib/gitlab/ci/status/build/failed.rb
+0
-3
spec/lib/gitlab/import_export/all_models.yml
spec/lib/gitlab/import_export/all_models.yml
+0
-3
spec/lib/gitlab/import_export/safe_model_attributes.yml
spec/lib/gitlab/import_export/safe_model_attributes.yml
+0
-3
No files found.
app/models/prometheus_metric.rb
View file @
3cef5835
# frozen_string_literal: true
class
PrometheusMetric
<
ActiveRecord
::
Base
<<<<<<<
HEAD
prepend
EE
::
PrometheusMetric
=======
>>>>>>>
upstream
/
master
belongs_to
:project
,
validate:
true
,
inverse_of: :prometheus_metrics
enum
group:
{
...
...
app/presenters/commit_status_presenter.rb
View file @
3cef5835
...
...
@@ -14,11 +14,8 @@ class CommitStatusPresenter < Gitlab::View::Presenter::Delegated
presents
:build
<<<<<<<
HEAD
prepend
::
EE
::
CommitStatusPresenter
=======
>>>>>>>
upstream
/
master
def
self
.
callout_failure_messages
CALLOUT_FAILURE_MESSAGES
end
...
...
config/prometheus/common_metrics.yml
View file @
3cef5835
...
...
@@ -187,19 +187,6 @@
-
container_memory_usage_bytes
weight
:
2
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
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
...
...
@@ -212,11 +199,7 @@
weight
:
1
queries
:
-
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}-(.*)",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
unit
:
"
cores"
-
title
:
"
Canary:
Core
Usage
(Pod
Average)"
...
...
@@ -230,7 +213,3 @@
label
:
Pod average
unit
:
"
cores"
track
:
canary
<<<<<<< HEAD:config/prometheus/common_metrics.yml
=======
>
>>>>>>
upstream/master:config/prometheus/common_metrics.yml
db/schema.rb
View file @
3cef5835
...
...
@@ -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"
,
[
"visibility_level"
],
name:
"index_projects_on_visibility_level"
,
using: :btree
<<<<<<<
HEAD
create_table
"prometheus_alerts"
,
force: :cascade
do
|
t
|
t
.
datetime_with_timezone
"created_at"
,
null:
false
t
.
datetime_with_timezone
"updated_at"
,
null:
false
...
...
@@ -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"
,
[
"prometheus_metric_id"
],
name:
"index_prometheus_alerts_on_prometheus_metric_id"
,
using: :btree
=======
>>>>>>>
upstream
/
master
create_table
"prometheus_metrics"
,
force: :cascade
do
|
t
|
t
.
integer
"project_id"
t
.
string
"title"
,
null:
false
...
...
@@ -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_repository_states"
,
"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"
,
"projects"
,
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
"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"
,
"users"
add_foreign_key
"protected_branch_push_access_levels"
,
"namespaces"
,
column:
"group_id"
,
name:
"fk_7111b68cdb"
,
on_delete: :cascade
...
...
doc/development/prometheus_metrics.md
View file @
3cef5835
...
...
@@ -6,12 +6,7 @@ We strive to support the 2-4 most important metrics for each common system servi
### 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:
>>>>>>> upstream/master
```
yaml
-
group
:
Response metrics (NGINX Ingress)
...
...
lib/gitlab/ci/status/build/failed.rb
View file @
3cef5835
...
...
@@ -15,11 +15,8 @@ module Gitlab
private_constant
:REASONS
<<<<<<<
HEAD
prepend
::
EE
::
Gitlab
::
Ci
::
Status
::
Build
::
Failed
=======
>>>>>>>
upstream
/
master
def
status_tooltip
base_message
end
...
...
spec/lib/gitlab/import_export/all_models.yml
View file @
3cef5835
...
...
@@ -355,12 +355,9 @@ priorities:
-
label
prometheus_metrics
:
-
project
<<<<<<< HEAD
-
prometheus_alerts
prometheus_alerts
:
-
project
=======
>
>>>>>>
upstream/master
timelogs
:
-
issue
-
merge_request
...
...
spec/lib/gitlab/import_export/safe_model_attributes.yml
View file @
3cef5835
...
...
@@ -596,15 +596,12 @@ PrometheusMetric:
-
group
-
common
-
identifier
<<<<<<< HEAD
PrometheusAlert
:
-
threshold
-
operator
-
environment_id
-
project_id
-
prometheus_metric_id
=======
>
>>>>>>
upstream/master
Badge
:
-
id
-
link_url
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment