While reading other document, I found that both time series need to have matching labels.
I have an extra label "region" for all metrics.
Aggregate on denominator "mode" doesn't make it work
node_load5{instance="host"} /
sum without (mode) (count(node_cpu_seconds_total{instance="host",mode="idle"}))
The following query works thought
sum without (instance, job, region) (node_load1{instance="host"}) /
sum without (mode) (count(node_cpu_seconds_total{instance="host",mode="idle"}))
but I really don't understand why
On Saturday, June 13, 2020 at 2:09:31 PM UTC-7, Ray Wu wrote:
I want to divide node_loadN by number of CPUs.
Both queries
node_load1{instance="hostname"}
and
count(node_cpu_seconds_total{instance="hostname",mode="idle"})
Returns expected results. But for query
node_load1{instance="hostname"} / count(node_cpu_seconds_total{instance="hostname",mode="idle"})
,the returned result is empty. What did I do wrong?