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 upFeature request: Filter queries on metric value #1216
Comments
This comment has been minimized.
This comment has been minimized.
|
Sounds like you simply want |
This comment has been minimized.
This comment has been minimized.
|
Oh, great :-) I did not understood this from "http://prometheus.io/docs/querying/operators/". Thank you very much for your quick reply. |
alexissavin
referenced this issue
Nov 13, 2015
Closed
Adding a query filter example for better understanding in the API doc… #5
alexissavin
closed this
Nov 13, 2015
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 24, 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. |
lock
bot
locked and limited conversation to collaborators
Mar 24, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
alexissavin commentedNov 13, 2015
Starting using Prometheus I'm looking for a way to filter some of my queries on the metric value.
Filter already allow us to select a set of metrics according to labels, but in some case, it would be useful to filter on the metric value.
The easiest example that I have in mind would be to filter "up" query to only retrieve down instances.
http://localhost:9090/api/v1/query?query=up{job="node"}&time=2015-11-13T11:30:00.0Z
Maybe this could be done with a specific function to look like the following ?
http://localhost:9090/api/v1/query?query=filter(,,up{job="node"})&time=2015-11-13T11:30:00.0Z
So that the request would look like this :
http://localhost:9090/api/v1/query?query=filter(gt,0,up{job="node"})&time=2015-11-13T11:30:00.0Z
Thanks for your feedback.