Question:
The node_cpu_seconds_total metric tracks the number of seconds cpu has spent in a specific mode. The metric will break it down per cpu using the cpu label.
Which query will return the total time all cpus on an instance spent in a mode that is not idle. Make sure to group the result on a per instance basis
node_cpu_seconds_total{cpu="0", instance="192.168.1.168:9100", job="test", mode="idle"}
node_cpu_seconds_total{cpu="0", instance="192.168.1.168:9100", job="test", mode="iowait"}
node_cpu_seconds_total{cpu="0", instance="192.168.1.168:9100", job="test", mode="irq"}
node_cpu_seconds_total{cpu="0", instance="192.168.1.168:9100", job="test", mode="nice"}
node_cpu_seconds_total{cpu="0", instance="192.168.1.168:9100", job="test", mode="softirq"}
node_cpu_seconds_total{cpu="0", instance="192.168.1.168:9100", job="test", mode="steal"}
node_cpu_seconds_total{cpu="0", instance="192.168.1.168:9100", job="test", mode="system"}
node_cpu_seconds_total{cpu="1", instance="192.168.1.168:9100", job="test", mode="idle"}
node_cpu_seconds_total{cpu="1", instance="192.168.1.168:9100", job="test", mode="iowait"}
node_cpu_seconds_total{cpu="1", instance="192.168.1.168:9100", job="test", mode="irq"}
node_cpu_seconds_total{cpu="1", instance="192.168.1.168:9100", job="test", mode="nice"}
node_cpu_seconds_total{cpu="1", instance="192.168.1.168:9100", job="test", mode="softirq"}
node_cpu_seconds_total{cpu="1", instance="192.168.1.168:9100", job="test", mode="steal"}
node_cpu_seconds_total{cpu="1", instance="192.168.1.168:9100", job="test", mode="system"}