Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorTim Zallmann <tzallmann@gitlab.com>2018-03-06 13:59:09 +0300
committerTim Zallmann <tzallmann@gitlab.com>2018-03-06 13:59:09 +0300
commit4cb348c15e5ae5289b1b9e9b738dd9ce5b24d738 (patch)
treea40dc625a7c7b40ddc6bd6a1218b1a89ed87464f /config
parent180739b2622bf235ffd0ef94d403de27b0b519b2 (diff)
parent27a838c838853c0acdacc29a9cd264e226e0a304 (diff)
Merge branch '43670-improve-gitlab-kubernetes-cpu-metrics' into 'master'
Improve GitLab Kubernetes CPU metrics Closes #43670 and #43462 See merge request gitlab-org/gitlab-ce!17403
Diffstat (limited to 'config')
-rw-r--r--config/prometheus/additional_metrics.yml12
1 files changed, 6 insertions, 6 deletions
diff --git a/config/prometheus/additional_metrics.yml b/config/prometheus/additional_metrics.yml
index 601a86490d4..c4f60eb2687 100644
--- a/config/prometheus/additional_metrics.yml
+++ b/config/prometheus/additional_metrics.yml
@@ -140,20 +140,20 @@
priority: 5
metrics:
- title: "Memory Usage"
- y_label: "Memory Usage (MB)"
+ y_label: "Memory Used per Pod"
required_metrics:
- container_memory_usage_bytes
weight: 1
queries:
- - query_range: '(sum(avg(container_memory_usage_bytes{container_name!="POD",environment="%{ci_environment_slug}"}) without (job))) / count(avg(container_memory_usage_bytes{container_name!="POD",environment="%{ci_environment_slug}"}) without (job)) /1024/1024'
+ - 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: Average
unit: MB
- - title: "CPU Utilization"
- y_label: "CPU Utilization (%)"
+ - title: "CPU Usage"
+ y_label: "Cores per Pod"
required_metrics:
- container_cpu_usage_seconds_total
weight: 1
queries:
- - query_range: 'sum(avg(rate(container_cpu_usage_seconds_total{container_name!="POD",environment="%{ci_environment_slug}"}[2m])) without (job)) * 100'
+ - 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: Average
- unit: "%" \ No newline at end of file
+ unit: "cores" \ No newline at end of file