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 upBinary Operators not working as expected in Prometheus 2.0 #3683
Comments
This comment has been minimized.
This comment has been minimized.
|
Ok, so got this working. Changing the equation and surrounding the second part of the equation with |
This comment has been minimized.
This comment has been minimized.
|
@brian-brazil Did we break anything here? |
This comment has been minimized.
This comment has been minimized.
|
Looks like a typical misunderstanding of binary operator vector matching. |
This comment has been minimized.
This comment has been minimized.
|
@brian-brazil totally possible given I'm rather new to all this. What puzzles me though is that the same query (without |
This comment has been minimized.
This comment has been minimized.
|
I see no indications of a bug in PromQL here. |
brian-brazil
closed this
Mar 12, 2018
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 22, 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. |
pslobo commentedJan 13, 2018
I've got the following simple query that is working in older versions of Prometheus:
node_load1{instance=~"$instance.*"} / count by(job, instance)(count by(job, instance, cpu)(node_cpu{instance=~"$instance.*"}))For some odd reason, this isn't working. When I test it out in Prometheus dashboard, it returns
no_data. However, when I try each individual section of the query, it works just fine.Example:
node_load1{instance=~"db_server.*"}=> 0.54count by(job, instance)(count by(job, instance, cpu)(node_cpu{instance=~"db_server.*"}))=> 2If I try any of these queries:
0.54 / count by(job, instance)(count by(job, instance, cpu)(node_cpu{instance=~"db_server.*"}))ornode_load1{instance=~"db_server.*"} / 2I get the expected results, but join the two and I getno_dataEnvironment
CentOS 7 server
Linux 3.10.0-693.11.1.el7.x86_64 x86_64
Prometheus, Grafana, Alertmanager all running on Docker
docker version
Client:
Version: 17.12.0-ce
API version: 1.35
Go version: go1.9.2
Git commit: c97c6d6
Built: Wed Dec 27 20:10:14 2017
OS/Arch: linux/amd64
Server:
Engine:
Version: 17.12.0-ce
API version: 1.35 (minimum version 1.12)
Go version: go1.9.2
Git commit: c97c6d6
Built: Wed Dec 27 20:12:46 2017
OS/Arch: linux/amd64
Experimental: false