Browse Source

fix subquery fallback to not have dependency on metric relabel if users doesnt provide it in BYO prometheus (#2082)

Signed-off-by: Alan Rodrigues <alanr5691@yahoo.com>
Alan Rodrigues 2 năm trước cách đây
mục cha
commit
bc5b1e9b0d
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      pkg/costmodel/allocation.go

+ 1 - 1
pkg/costmodel/allocation.go

@@ -84,7 +84,7 @@ const (
 	// the resolution, to make sure the irate always has two points to query
 	// in case the Prom scrape duration has been reduced to be equal to the
 	// ETL resolution.
-	queryFmtCPUUsageMaxSubquery = `max(max_over_time(irate(container_cpu_usage_seconds_total{container_name!="POD", container_name!="", %s}[%s])[%s:%s])) by (container_name, container, pod_name, pod, namespace, instance, %s)`
+	queryFmtCPUUsageMaxSubquery = `max(max_over_time(irate(container_cpu_usage_seconds_total{container!="POD", container!="", %s}[%s])[%s:%s])) by (container, pod_name, pod, namespace, instance, %s)`
 )
 
 // Constants for Network Cost Subtype