Commit 01537328 authored by ale's avatar ale

Change aggregation of CPU usage rules

parent a37f16a1
Pipeline #3385 passed with stage
in 4 minutes and 59 seconds
......@@ -2,10 +2,10 @@ groups:
- name: roles/prometheus/files/rules/rules_cpu.conf
rules:
- record: instance:node_cpus:count
expr: count(node_cpu{mode="idle"}) without (cpu, mode)
expr: count(node_cpu{mode="idle"}) by (host, instance)
- record: instance_mode:node_cpu:rate5m
expr: sum(rate(node_cpu[5m])) without (cpu)
expr: sum(rate(node_cpu[5m])) by (host, instance, mode)
- record: instance_utilization:node_cpu:rate5m
expr: sum(rate(node_cpu{mode!="idle"}[5m])) without (mode, cpu)
expr: sum(rate(node_cpu{mode!="idle"}[5m])) by (host, instance)
- record: instance_utilization:rate5m
expr: instance_utilization:node_cpu:rate5m / instance:node_cpus:count
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment