From 6e2ce46760f4d5dd77f77cb65e87d17223a07399 Mon Sep 17 00:00:00 2001 From: Joshua Lambert Date: Fri, 8 Sep 2017 16:35:17 -0400 Subject: [PATCH] Update k8s metrics and docs --- config/prometheus/additional_metrics.yml | 2 +- doc/user/project/integrations/prometheus_library/kubernetes.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/prometheus/additional_metrics.yml b/config/prometheus/additional_metrics.yml index 11670282ef9..407a6b0c73c 100644 --- a/config/prometheus/additional_metrics.yml +++ b/config/prometheus/additional_metrics.yml @@ -153,7 +153,7 @@ - container_cpu_usage_seconds_total weight: 1 queries: - - query_range: 'sum(rate(container_cpu_usage_seconds_total{container_name!="POD",%{environment_filter}}[2m]) * 100) by (cpu)' + - query_range: 'sum(rate(container_cpu_usage_seconds_total{container_name!="POD",%{environment_filter}}[2m])) by (cpu) * 100' label: CPU unit: "%" series: diff --git a/doc/user/project/integrations/prometheus_library/kubernetes.md b/doc/user/project/integrations/prometheus_library/kubernetes.md index a4a385b88e9..4d39ae0c4fa 100644 --- a/doc/user/project/integrations/prometheus_library/kubernetes.md +++ b/doc/user/project/integrations/prometheus_library/kubernetes.md @@ -8,7 +8,7 @@ GitLab has support for automatically detecting and monitoring Kubernetes metrics | Name | Query | | ---- | ----- | | Average Memory Usage (MB) | (sum(container_memory_usage_bytes{container_name!="POD",%{environment_filter}}) / count(container_memory_usage_bytes{container_name!="POD",%{environment_filter}})) /1024/1024 | -| Average CPU Utilization (%) | sum(rate(container_cpu_usage_seconds_total{container_name!="POD",%{environment_filter}}[2m])) by (cpu) / count(container_cpu_usage_seconds_total{container_name!="POD",%{environment_filter}}) * 100 | +| Average CPU Utilization (%) | sum(rate(container_cpu_usage_seconds_total{container_name!="POD",%{environment_filter}}[2m])) by (cpu) * 100 | ## Configuring Prometheus to monitor for Kubernetes node metrics