From a1174b08a69c3796b08e5b21e2f254d72b80f0b6 Mon Sep 17 00:00:00 2001 From: Marek Siarkowicz Date: Mon, 14 May 2018 13:56:28 +0200 Subject: [PATCH] [prometheus addon] Add filter on image in tests to remove pod timeseries New pod timeseries was introduced that has same labels for namespace and pod_name resulting in doubling value in old query. New metric is not based on containers so filtering on image solves that problem. --- test/e2e/instrumentation/monitoring/prometheus.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/instrumentation/monitoring/prometheus.go b/test/e2e/instrumentation/monitoring/prometheus.go index e05b3e63e0f..5b2d2e1b126 100644 --- a/test/e2e/instrumentation/monitoring/prometheus.go +++ b/test/e2e/instrumentation/monitoring/prometheus.go @@ -91,7 +91,7 @@ var _ = instrumentation.SIGDescribe("[Feature:PrometheusMonitoring] Prometheus", }) func prometheusCPUQuery(namespace, podNamePrefix string, rate time.Duration) string { - return fmt.Sprintf(`sum(irate(container_cpu_usage_seconds_total{namespace="%v",pod_name=~"%v.*"}[%vm]))`, + return fmt.Sprintf(`sum(irate(container_cpu_usage_seconds_total{namespace="%v",pod_name=~"%v.*",image!=""}[%vm]))`, namespace, podNamePrefix, int64(rate.Minutes())) }