Skip to content

Commit

Permalink
fix cluster:node_cpu:ratio query
Browse files Browse the repository at this point in the history
  • Loading branch information
ravilr committed Feb 10, 2022
1 parent e4aae0f commit 1d1ca28
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
record: 'cluster:node_cpu:sum_rate5m',
},
{
expr: 'cluster:node_cpu_seconds_total:rate5m / count(sum(node_cpu_seconds_total) BY (instance, cpu))',
expr: 'cluster:node_cpu:sum_rate5m / count(sum(node_cpu_seconds_total) BY (instance, cpu))',
record: 'cluster:node_cpu:ratio',
},
],
Expand Down
4 changes: 2 additions & 2 deletions manifests/kubePrometheus-prometheusRule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ spec:
record: instance:node_cpu:ratio
- expr: sum(rate(node_cpu_seconds_total{mode!="idle",mode!="iowait",mode!="steal"}[5m]))
record: cluster:node_cpu:sum_rate5m
- expr: cluster:node_cpu_seconds_total:rate5m / count(sum(node_cpu_seconds_total)
BY (instance, cpu))
- expr: cluster:node_cpu:sum_rate5m / count(sum(node_cpu_seconds_total) BY (instance,
cpu))
record: cluster:node_cpu:ratio
- name: kube-prometheus-general.rules
rules:
Expand Down

0 comments on commit 1d1ca28

Please sign in to comment.