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?
>
>
--
You received this message because you are subscribed to the Google Groups
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/de03c9fa-4d5a-46ff-8b9c-76abeb1e5e5bo%40googlegroups.com.