Browse Source

Updated diagnostics queries.

Signed-off-by: Nik Willwerth <nwillwerth@kubecost.com>
Nik Willwerth 3 năm trước cách đây
mục cha
commit
d11211825f
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  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: {
 	KSMCPUCapacityMetricID: {
 		ID:          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",
 		Label:       "KSM had CPU capacity during the last 5 minutes",
 		Description: "Determine if KSM had CPU capacity during the last 5 minutes",
 		Description: "Determine if KSM had CPU capacity during the last 5 minutes",
 	},
 	},
 	KSMAllocatableCPUCoresMetricID: {
 	KSMAllocatableCPUCoresMetricID: {
 		ID:          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",
 		Label:       "KSM had allocatable CPU cores during the last 5 minutes",
 		Description: "Determine if KSM had allocatable CPU cores during the last 5 minutes",
 		Description: "Determine if KSM had allocatable CPU cores during the last 5 minutes",
 	},
 	},