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 upQuerying raw datapoints #605
Comments
This comment has been minimized.
This comment has been minimized.
|
@stapelberg We want to have better support for getting raw data out, but there's already a way: There's a For example:
That also works (giving completely raw samples) when doing the same in the tabular view of the expression browser. |
This comment has been minimized.
This comment has been minimized.
|
Thanks for explaining, this is what I’ve been looking for :). |
This comment has been minimized.
This comment has been minimized.
|
Looks like this was answered. |
brian-brazil
closed this
Aug 20, 2015
This comment has been minimized.
This comment has been minimized.
jf
commented
Dec 29, 2016
|
It looks like this isn't possible now? (getting a 404 now, just with |
This comment has been minimized.
This comment has been minimized.
|
The unversioned legacy API was removed. Try: http://localhost:9090/api/v1/query?query=node_disk_bytes_written |
This comment has been minimized.
This comment has been minimized.
rohitChaware
commented
Jan 26, 2017
•
|
Is this endpoint "GET /api/query?expr=<prometheus_query_expression>" documented? Also, are there any POST endpoints? I didn't find them on https://prometheus.io/docs/querying/api/ . |
This comment has been minimized.
This comment has been minimized.
|
@rohitChaware No, that's the old legacy endpoint which doesn't exist anymore in recent Prometheus versions. If with a POST endpoint you mean an endpoint for pushing data, that doesn't exist. All current API methods are documented at https://prometheus.io/docs/querying/api/ |
This comment has been minimized.
This comment has been minimized.
rohitChaware
commented
Jan 26, 2017
|
Thanks @juliusv for the quick response! Is there any other similar way to pass directly a Prometheus query expression to Prometheus without passing separate query parameters in URL? This "GET /api/query?expr=<prometheus_query_expression>" is really helpful. |
This comment has been minimized.
This comment has been minimized.
|
@rohitChaware No, they expression query is always sent via a query parameter. What would you have imagined? |
This comment has been minimized.
This comment has been minimized.
rohitChaware
commented
Jan 26, 2017
•
|
@juliusv The APIs documented send individual Prometheus expression query parameters(like start, end, step) separately in URL parameters. But in this "GET /api/query?expr=<prometheus_query_expression>", we are sending the complete Prometheus expression as a URL parameter. And I am looking for the latter type of API where we don't have to separate individual parameters and also don't have to access different end points(like /api/v1/query or /api/v1/query_range) based on the type of query. Please correct me if my understanding is not right. |
simonpasquier
pushed a commit
to simonpasquier/prometheus
that referenced
this issue
Oct 12, 2017
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. |
stapelberg commentedMar 20, 2015
I have a boolean value that I’m scraping (i.e. it can be either 0 or 1, nothing else), and I’m having trouble figuring out how to query prometheus so that it will give me the raw data points. In promdash, I always get interpolated points, and even hitting the API end point directly, I get interpolated data points:
Note how values contains 0.1732…
How can I get just the raw, scraped data points for debugging/understanding my time series better?