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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
c559fdd3
Commit
c559fdd3
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 Kubernetes CPU/Mem usage totals
parent
151d87e4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
5 deletions
+28
-5
changelogs/unreleased/add-cpu-mem-totals.yml
changelogs/unreleased/add-cpu-mem-totals.yml
+5
-0
config/prometheus/additional_metrics.yml
config/prometheus/additional_metrics.yml
+23
-5
No files found.
changelogs/unreleased/add-cpu-mem-totals.yml
0 → 100644
View file @
c559fdd3
---
title
:
Add Total CPU/Memory consumption metrics for Kubernetes
merge_request
:
17731
author
:
type
:
added
config/prometheus/additional_metrics.yml
View file @
c559fdd3
...
...
@@ -139,21 +139,39 @@
-
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'
-
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
:
"
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))'
-
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))'
label
:
Pod average
unit
:
"
cores"
\ No newline at end of file
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