I see, thanks!
On Sunday, June 14, 2020 at 12:54:33 AM UTC-7, Ben Kochie wrote:
>
> You need to remove both cpu and mode for the labels to match:
>
> node_load1 / count without (cpu,mode) (node_cpu_seconds_total{mode="idle"})
>
> On Sun, Jun 14, 2020 at 1:16 AM Ray Wu <[email protected] <javascript:>>
> wrote:
>
>> 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] <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/prometheus-users/de03c9fa-4d5a-46ff-8b9c-76abeb1e5e5bo%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/prometheus-users/de03c9fa-4d5a-46ff-8b9c-76abeb1e5e5bo%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
--
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/e2d1315d-74c6-4774-8dc5-e4d7407829c0o%40googlegroups.com.