Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upStrange behavior of 'count' #2489
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
For usage questions, https://groups.google.com/forum/#!aboutgroup/prometheus-users is the best place to get answers. |
brian-brazil
closed this
Mar 10, 2017
This comment has been minimized.
This comment has been minimized.
|
Well, I think this may be a bug. So I report it. Could you plz take another look? |
This comment has been minimized.
This comment has been minimized.
|
It is not a bug. You need to understand label matching, see https://prometheus.io/docs/querying/operators/#vector-matching . If you discuss this questions on the mailing list, other users can benefit from the answers. |
This comment has been minimized.
This comment has been minimized.
|
Oh sorry, thank you for your reply. |
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 23, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |

kehao95 commentedMar 10, 2017
I have totally no idea what was going on here. So I will just describe how I tried this and what did I see.
I was trying to calculate the cpu_load pre-CPU using the metrics exported by the node_expoter.
So I calculated as this:
What did I do?
In the prometheus web interface, exec
node_load1 / (count by(instance)(count by(instance, cpu)(node_cpu)))'no data'
for debug I specific the instance id and tear this apart:
Here is some experiments:
Environment
Linux 4.4.35-33.55.amzn1.x86_64 x86_64