'Grafana Lod5m/ Cores

I'm trying to get a the result of the max_over_time load5m divided by the number of CPU cores I have a table with the below queries and both works

query D = max_over_time(node_load5{job=~"$node}[$interval])

query C = count(node_cpu_seconds_total{job=~"$node, mode="system"}) by (instance)

however dividing the two queries does not works

Appreciate your help



Solution 1:[1]

The labels in the two queries must match.

Query 1:

enter image description here

Query 2:

enter image description here

The labels don't match!

You need to add all labels in the "by" clause, like in the following example:

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Marcelo Ávila de Oliveira