I see. many thanks Brain!
在 2020年6月10日星期三 UTC+8下午8:34:36,Brian Candler写道:
>
> Not in prometheus - because it's an API. The consumer of the API is
> responsible for rendering the time in human-readable form.
>>
>>
> However, you can always write a little Python script or whatever that
> replaces
Not in prometheus - because it's an API. The consumer of the API is
responsible for rendering the time in human-readable form.
>
>
However, you can always write a little Python script or whatever that
replaces each time value with a string.
--
You received this message because you are subscrib
Thank Brian Candler & Brian Braizil !!
The last question, is there the way I can transform UNIX timestamp to
human readable time string in the below API you give?
curl -Ssg 'localhost:9090/api/v1/query?query=up{instance="sw1"}[5m]'
在 2020年6月10日星期三 UTC+8下午3:04:15,Brian Candler写道:
>
> As Brian
As Brian said, use a range vector query rather than an instant query.
# curl -Ssg 'localhost:9090/api/v1/query?query=up{instance="sw1"}[5m]' |
python3 -mjson.tool
{
"status": "success",
...
[
1591772319.53,
"1"
Brian,
How can I get raw samples with exactly scraping time from Prometheus by the
range query?
I use this call to query data , and use parameter step=30,
curl --location --request GET
'http://xxx:9090/api/v1/query_range?query=node_processes_state{state%3D%27D%27}%20%3E%20500&start=2020-06-08T
On Tue, 9 Jun 2020 at 16:15, 林浩 wrote:
> when I use range query api to get data point, for example I using step 30s
>
> API return me data like these
>
> "values": [
> [
> 1591607520,
> "2270"
> ],
>
when I use range query api to get data point, for example I using step 30s
API return me data like these
"values": [
[
1591607520,
"2270"
],
[
1591607550,
7 matches
Mail list logo