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
b8987618
Commit
b8987618
authored
Apr 06, 2018
by
Joshua Lambert
Committed by
Mike Greiling
Apr 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add CPU/Memory totals to Kubernetes system metrics
parent
8dca31d5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
7 deletions
+31
-7
config/prometheus/additional_metrics.yml
config/prometheus/additional_metrics.yml
+26
-7
ee/changelogs/unreleased/ee-add-cpu-mem-totals.yml
ee/changelogs/unreleased/ee-add-cpu-mem-totals.yml
+5
-0
No files found.
config/prometheus/additional_metrics.yml
View file @
b8987618
...
...
@@ -139,29 +139,48 @@
-
group
:
System metrics (Kubernetes)
priority
:
5
metrics
:
-
title
:
"
Memory
Usage"
-
title
:
"
Memory
Usage
(Total)"
y_label
:
"
Total
Memory
Used"
required_metrics
:
-
container_memory_usage_bytes
weight
:
4
queries
:
-
query_range
:
'
avg(sum(container_memory_usage_bytes{container_name!="POD",pod_name=~"^%{ci_environment_slug}-(.*)",namespace="%{kube_namespace}"})
by
(job))
without
(job)
/1024/1024/1024'
label
:
Total
unit
:
GB
-
title
:
"
Core
Usage
(Total)"
y_label
:
"
Total
Cores"
required_metrics
:
-
container_cpu_usage_seconds_total
weight
:
3
queries
:
-
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)'
label
:
Total
unit
:
"
cores"
-
title
:
"
Memory
Usage
(Pod
Average)"
y_label
:
"
Memory
Used
per
Pod"
required_metrics
:
-
container_memory_usage_bytes
weight
:
1
weight
:
2
queries
:
-
query_range
:
'
avg(sum(container_memory_usage_bytes{container_name!="POD",pod_name=~"^%{ci_environment_slug}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="%{kube_namespace}"})
by
(job))
without
(job)
/
count(avg(container_memory_usage_bytes{container_name!="POD",pod_name=~"^%{ci_environment_slug}-([^c].*|c([^a]|a([^n]|n([^a]|a([^r]|r[^y])))).*|)-(.*)",namespace="%{kube_namespace}"})
without
(job))
/1024/1024'
label
:
A
verage
label
:
Pod a
verage
unit
:
MB
-
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
:
A
verage
label
:
Pod a
verage
unit
:
MB
track
:
canary
-
title
:
"
C
PU
Usage
"
-
title
:
"
C
ore
Usage
(Pod
Average)
"
y_label
:
"
Cores
per
Pod"
required_metrics
:
-
container_cpu_usage_seconds_total
weight
:
1
queries
:
-
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))'
label
:
A
verage
label
:
Pod a
verage
unit
:
"
cores"
-
query_range
:
'
avg(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^%{ci_environment_slug}-canary-(.*)",namespace="%{kube_namespace}"}[15m]))
by
(job))
without
(job)
/
count(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",pod_name=~"^%{ci_environment_slug}-canary-(.*)",namespace="%{kube_namespace}"}[15m]))
by
(pod_name))'
label
:
A
verage
label
:
Pod a
verage
unit
:
"
cores"
track
:
canary
ee/changelogs/unreleased/ee-add-cpu-mem-totals.yml
0 → 100644
View file @
b8987618
---
title
:
Add total CPU/Memory metrics, adds weighting for proper sorting
merge_request
:
5260
author
:
type
:
added
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