瀏覽代碼

Updated diagnostics queries.

Signed-off-by: Nik Willwerth <nwillwerth@kubecost.com>
Nik Willwerth 3 年之前
父節點
當前提交
d11211825f
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      pkg/prom/diagnostics.go

+ 2 - 2
pkg/prom/diagnostics.go

@@ -127,13 +127,13 @@ var diagnosticDefinitions map[string]*diagnosticDefinition = map[string]*diagnos
 	},
 	KSMCPUCapacityMetricID: {
 		ID:          KSMCPUCapacityMetricID,
-		QueryFmt:    `avg_over_time(kube_node_status_capacity_cpu_cores[5m] %s) == 0`,
+		QueryFmt:    `absent_over_time(kube_node_status_capacity_cpu_cores[5m] %s)`,
 		Label:       "KSM had CPU capacity during the last 5 minutes",
 		Description: "Determine if KSM had CPU capacity during the last 5 minutes",
 	},
 	KSMAllocatableCPUCoresMetricID: {
 		ID:          KSMAllocatableCPUCoresMetricID,
-		QueryFmt:    `avg_over_time(kube_node_status_allocatable_cpu_cores[5m] %s) == 0`,
+		QueryFmt:    `absent_over_time(kube_node_status_allocatable_cpu_cores[5m] %s)`,
 		Label:       "KSM had allocatable CPU cores during the last 5 minutes",
 		Description: "Determine if KSM had allocatable CPU cores during the last 5 minutes",
 	},