summaryrefslogtreecommitdiff
path: root/config/prometheus
diff options
context:
space:
mode:
authorJoshua Lambert <joshua.lambert@gmail.com>2018-02-27 23:52:05 -0500
committerJoshua Lambert <joshua.lambert@gmail.com>2018-02-27 23:52:05 -0500
commite587c6b63748f45258d65ca80146e9d9b77d7d37 (patch)
treedc0a33d0b4b195e5f7b6400ed63472c0a34698d0 /config/prometheus
parentd4867c518f2d72125c619c191fa9577dabb1ae9a (diff)
downloadgitlab-ce-e587c6b63748f45258d65ca80146e9d9b77d7d37.tar.gz
Fix k8s metrics
Diffstat (limited to 'config/prometheus')
-rw-r--r--config/prometheus/additional_metrics.yml10
1 files changed, 5 insertions, 5 deletions
diff --git a/config/prometheus/additional_metrics.yml b/config/prometheus/additional_metrics.yml
index 601a86490d4..1628af9c38d 100644
--- a/config/prometheus/additional_metrics.yml
+++ b/config/prometheus/additional_metrics.yml
@@ -145,15 +145,15 @@
- 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"
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)'
label: Average
- unit: "%" \ No newline at end of file
+ unit: "cores" \ No newline at end of file