Skip to content

Commit

Permalink
Update pkg/metrics/system.go
Browse files Browse the repository at this point in the history
Co-authored-by: Raúl Sevilla <[email protected]>
  • Loading branch information
jtaleric and rsevilla87 authored Nov 15, 2024
1 parent eada105 commit 2cf30f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/metrics/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ func QueryNodeCPU(node NodeInfo, conn PromConnect, start time.Time, end time.Tim
return cpu, true
}

// TopPodCPU will return the top 5 CPU consumers for a specific node
// TopPodCPU will return the top 10 CPU consumers for a specific node
func TopPodCPU(node NodeInfo, conn PromConnect, start time.Time, end time.Time) (PodValues, bool) {
var pods PodValues
query := fmt.Sprintf("topk(10,sum(irate(container_cpu_usage_seconds_total{name!=\"\",instance=~\"%s:.*\"}[2m]) * 100) by (pod, namespace, instance))", node.IP)
Expand Down

0 comments on commit 2cf30f6

Please sign in to comment.