diff options
author | Joshua Lambert <joshua@gitlab.com> | 2017-11-07 16:51:11 +0000 |
---|---|---|
committer | Joshua Lambert <joshua@gitlab.com> | 2017-11-12 12:27:25 -0500 |
commit | bc58f625c4a964212fd991982417cb5b561b0c99 (patch) | |
tree | c4b5e905f212f134ef10181ddddbddc199b43c99 /config | |
parent | 111faddc50fa2cdf12988b68c3f4e3660f3139a8 (diff) | |
download | gitlab-ce-bc58f625c4a964212fd991982417cb5b561b0c99.tar.gz |
Adjust metrics to ignore Job tag to support k8s 1.7+
Diffstat (limited to 'config')
-rw-r--r-- | config/prometheus/additional_metrics.yml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/config/prometheus/additional_metrics.yml b/config/prometheus/additional_metrics.yml index 190eeb59a2c..073948a965a 100644 --- a/config/prometheus/additional_metrics.yml +++ b/config/prometheus/additional_metrics.yml @@ -145,7 +145,7 @@ - container_memory_usage_bytes weight: 1 queries: - - query_range: '(sum(container_memory_usage_bytes{container_name!="POD",environment="%{ci_environment_slug}"}) / count(container_memory_usage_bytes{container_name!="POD",environment="%{ci_environment_slug}"})) /1024/1024' + - query_range: '(sum(avg(container_memory_usage_bytes{container_name!="POD",environment="production"}) without (job))) / count(avg(container_memory_usage_bytes{container_name!="POD",environment="production"}) without (job)) /1024/1024' label: Average unit: MB - title: "CPU Utilization" @@ -154,7 +154,7 @@ - container_cpu_usage_seconds_total weight: 1 queries: - - query_range: 'sum(rate(container_cpu_usage_seconds_total{container_name!="POD",environment="%{ci_environment_slug}"}[2m])) * 100' + - query_range: 'avg(sum(rate(container_cpu_usage_seconds_total{container_name!="POD",environment="%{ci_environment_slug}"}[2m])) * 100) without (job)' label: CPU unit: "%" series: |